﻿




@font-face { font-family: 'Caveat'; font-weight: 500; font-display: swap; src: url('lib/fonts/caveat.ttf') format('truetype'); }
@font-face { font-family: 'Dancing Script'; font-weight: 400; font-display: swap; src: url('lib/fonts/dancingscript.ttf') format('truetype'); }
@font-face { font-family: 'Great Vibes'; font-weight: 400; font-display: swap; src: url('lib/fonts/greatvibes.ttf') format('truetype'); }
@font-face { font-family: 'Pacifico'; font-weight: 400; font-display: swap; src: url('lib/fonts/pacifico.ttf') format('truetype'); }

@supports (font-variation-settings: normal) {
  :root { font-family: 'Inter var', Inter, ui-sans-serif, system-ui, sans-serif; }
}

:root {
  

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;
  --s9: 48px; --s10: 64px; --s11: 80px; --s12: 96px; --s13: 128px;

  --r1: 4px; --r2: 8px; --r3: 12px; --r4: 18px;

  --maxw: 1180px;
  --maxw-narrow: 720px;

  --tx: cubic-bezier(0.22, 1, 0.36, 1);
  --tx-fast: 160ms var(--tx);
  --tx-mid: 280ms var(--tx);

  

  --bg: #f4f2ee;          

  --bg-card: #ffffff;
  --bg-sunk: #ebe9e4;
  --bg-cream: #faf8f3;
  --line: #d4d1ca;
  --line-soft: #e2dfd8;
  --ink: #18171a;
  --ink-2: #4a484a;
  --ink-3: #87858a;
  --accent: #d44a1c;       

  --accent-soft: #f5dccc;
  --accent-ink: #ffffff;
  --good: #2d6a4f;
  --good-soft: #d8e7df;
  --bad: #b22222;

  --shadow-1: 0 1px 0 rgba(20,20,18,0.04);
  --shadow-2: 0 1px 0 rgba(20,20,18,0.06), 0 8px 24px -8px rgba(20,20,18,0.10);
  --shadow-3: 0 1px 0 rgba(20,20,18,0.08), 0 24px 48px -12px rgba(20,20,18,0.14);
}

[data-theme="dark"] {
  --bg: #0d0d0c;
  --bg-card: #161614;
  --bg-sunk: #08080a;
  --bg-cream: #1a1a18;
  --line: #29281f;
  --line-soft: #1f1e1b;
  --ink: #f5f4f0;
  --ink-2: #b3b1ab;
  --ink-3: #6b6964;
  --accent: #ff6a3d;
  --accent-soft: #2a1810;
  --good: #4ec07f;
  --good-soft: #0e2a18;
  --shadow-2: 0 1px 0 rgba(0,0,0,0.4), 0 8px 24px -8px rgba(0,0,0,0.5);
  --shadow-3: 0 1px 0 rgba(0,0,0,0.5), 0 24px 48px -12px rgba(0,0,0,0.7);
}



*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "cv11","ss01","ss03","kern";
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 12px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s6);
}
.container.narrow { max-width: var(--maxw-narrow); }
[hidden] { display: none !important; }



h1, h2, h3, h4 {
  font-weight: 580;
  letter-spacing: -0.024em;
  line-height: 1.05;
  color: var(--ink);
}
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.018em; }
h4 { font-size: 14px; letter-spacing: -0.005em; font-weight: 600; }
p { color: var(--ink-2); }

.kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s4);
}
.lede {
  font-size: 17px;
  color: var(--ink-2);
  margin-top: var(--s3);
  max-width: 580px;
  line-height: 1.55;
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 44px;
  padding: 0 var(--s5);
  border-radius: var(--r2);
  font-size: 14px;
  font-weight: 540;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: all var(--tx-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn-solid {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-line {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-cta {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--bg-card);
  height: 50px;
  padding: 0 var(--s7);
  font-size: 15px;
}
.btn-cta:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }



.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--tx-fast);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s4) var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
}
.brand-icon { display: inline-flex; }
.brand-icon svg { display: block; }
.brand-word {
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.035em;
}
.brand-word em {
  font-style: normal;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: var(--s7);
  font-size: 14px;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  font-weight: 500;
  transition: color var(--tx-fast);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tx-mid);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: var(--s2); }
.iconbtn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: all var(--tx-fast);
  background: var(--bg-card);
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink); }
.iconbtn svg { width: 16px; height: 16px; }
.ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: none; }
[data-theme="dark"] .ic-moon { display: block; }

@media (max-width: 760px) { .nav-links { display: none; } }



.hero {
  padding: var(--s12) 0 var(--s11);
  position: relative;
  overflow: hidden;
}


.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 79px, var(--line-soft) 79px 80px);
  opacity: 0.4;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s6);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s11);
  align-items: center;
  position: relative;
}
.hero-side-left { position: relative; z-index: 2; }
.hero-h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--s6);
}
.hero-h1 .hl {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: var(--s8);
}
.hero-cta { display: flex; gap: var(--s3); flex-wrap: wrap; }



.hero-side-right { position: relative; z-index: 1; }
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  padding: var(--s7) var(--s6) var(--s8);
  box-shadow: var(--shadow-2);
  position: relative;
  transform: rotate(1.5deg);
  max-width: 320px;
  margin-left: auto;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background:
    repeating-linear-gradient(90deg, var(--bg-card) 0 8px, transparent 8px 16px);
  background-size: 16px 8px;
  border-radius: var(--r3) var(--r3) 0 0;
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px dashed var(--line-soft);
}
.hero-card-row:last-of-type { border-bottom: 0; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.hero-card-stamp {
  margin-top: var(--s5);
  padding: var(--s2) var(--s3);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  line-height: 1.4;
  transform: rotate(-3deg);
  display: inline-block;
  margin-left: auto;
  display: block;
  width: fit-content;
  margin-left: auto;
}



.hero-strip {
  max-width: var(--maxw);
  margin: var(--s11) auto 0;
  padding: var(--s7) var(--s6) 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s6);
}
.strip-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.strip-item strong {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-feature-settings: "tnum";
  line-height: 1;
}
.strip-item span {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s8); }
  .hero-side-right { display: none; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
  .strip-item strong { font-size: 28px; }
}



.sec-head {
  text-align: center;
  margin-bottom: var(--s11);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.sec-head .lede { margin-left: auto; margin-right: auto; }
.sec-head-l { text-align: left; margin-left: 0; }
.sec-head-l .lede { margin-left: 0; }



.tools { padding: var(--s12) 0 var(--s12); }





.nav-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin: 0 var(--s5);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--ink-3);
  pointer-events: none;
  transition: color var(--tx-fast);
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 44px 0 36px;
  font: inherit;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  color: var(--ink);
  transition: all var(--tx-fast);
}
.search-input::placeholder {
  color: var(--ink-3);
}
.search-input:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}
.search-input:focus + .search-kbd { opacity: 0; }
.nav-search:has(.search-input:focus) .search-icon { color: var(--accent); }

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px; width: 14px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='7' cy='7' r='7' fill='%2387858a'/%3E%3Cpath d='M4.5 4.5l5 5M9.5 4.5l-5 5' stroke='%23fff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 14px;
  cursor: pointer;
  margin-right: 4px;
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity var(--tx-fast);
}



.recents {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px 8px 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  margin-bottom: var(--s7);
  max-width: 100%;
  overflow: hidden;
}
.recents-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: none;
}
.recents-items {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.recents-items::-webkit-scrollbar { display: none; }
.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 540;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--tx-fast);
}
.recent-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card);
}
.recents-clear {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-3);
  flex: none;
  transition: all var(--tx-fast);
}
.recents-clear:hover { color: var(--bad); background: var(--bg-sunk); }



.search-no-match {
  text-align: center;
  padding: var(--s11) var(--s5);
  font-size: 15px;
  color: var(--ink-3);
  font-style: italic;
}



.tg.tg-hidden { display: none; }
.tool.tool-hidden { display: none; }

@media (max-width: 880px) {
  .nav-search { max-width: 220px; margin: 0 var(--s3); }
  .search-input { font-size: 12px; }
}
@media (max-width: 720px) {
  

  .nav-inner { flex-wrap: wrap; row-gap: var(--s3); }
  .nav-search { order: 99; flex-basis: 100%; max-width: 100%; margin: 0; }
  .search-input { height: 40px; }
}
@media (max-width: 480px) {
  .search-kbd { display: none; }
}



.tg {
  margin-bottom: var(--s11);
}
.tg:last-child {
  margin-bottom: 0;
}
.tg-head {
  margin-top: var(--s6);
}
.tg-head {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  margin-bottom: var(--s6);
}
.tg-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
}
.tg-head h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tg-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-bottom: 6px;
}

.tg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s3);
}
.tool {
  position: relative;
  text-align: left;
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--tx-fast);
  overflow: hidden;
}
.tool::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transform: translateY(100%);
  transition: transform var(--tx-mid), opacity var(--tx-fast);
  z-index: 0;
}
.tool > * { position: relative; z-index: 1; }
.tool:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  color: var(--accent-ink);
}
.tool:hover::before { transform: translateY(0); opacity: 1; }
.tool:hover svg { color: var(--accent-ink); }
.tool:active { transform: translateY(0); }
.tool svg {
  width: 28px; height: 28px;
  color: var(--ink);
  margin-bottom: var(--s3);
  transition: color var(--tx-fast);
}
.tool b {
  display: block;
  font-size: 15px;
  font-weight: 580;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color var(--tx-fast);
}
.tool:hover b { color: var(--accent-ink); }
.tool i {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.4;
  transition: color var(--tx-fast);
}
.tool:hover i { color: var(--accent-ink); opacity: 0.85; }

@media (max-width: 480px) {
  .tg-grid { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .tool { padding: var(--s4); }
}



.workspace { padding: var(--s9) 0 var(--s12); }
.ws-head {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-bottom: var(--s8);
  padding-bottom: var(--s6);
  border-bottom: 1px solid var(--line);
}
.ws-title h2 { font-size: 32px; }
.ws-title .kicker { margin: 0 0 4px; }
.back {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 38px; padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  font-size: 13px;
  font-weight: 540;
  color: var(--ink-2);
  background: var(--bg-card);
  transition: all var(--tx-fast);
}
.back:hover { color: var(--ink); border-color: var(--ink); }

.dz {
  display: block;
  border: 2px dashed var(--line);
  border-radius: var(--r4);
  padding: var(--s11) var(--s6);
  text-align: center;
  background: var(--bg-card);
  transition: all var(--tx-fast);
  position: relative;
  cursor: pointer;
}
.dz:hover, .dz.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dz-mark {
  width: 44px; height: 44px;
  margin: 0 auto var(--s4);
  color: var(--ink-2);
}
.dz h3 { font-size: 18px; margin-bottom: 4px; }
.dz p { font-size: 14px; color: var(--ink-3); }
.dz input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }



.preview-panel {
  margin-top: var(--s5);
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  display: none;
}
.preview-panel.on { display: block; }
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line-soft);
}
.preview-head h4 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.preview-info { font-size: 12px; color: var(--ink-3); font-feature-settings: "tnum"; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--s3);
  max-height: 320px;
  overflow-y: auto;
  padding: var(--s2);
}
.preview-thumb {
  position: relative;
  aspect-ratio: 0.707;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r1);
  overflow: hidden;
}
.preview-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  transition: transform 0.25s var(--tx);
  transform-origin: center center;
}



.preview-thumb[data-rot="90"]  canvas { transform: rotate(90deg)  scale(0.707); }
.preview-thumb[data-rot="180"] canvas { transform: rotate(180deg); }
.preview-thumb[data-rot="270"] canvas { transform: rotate(270deg) scale(0.707); }



.preview-thumb-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--tx);
  z-index: 3;
}
.preview-thumb:hover .preview-thumb-hover {
  opacity: 1;
  pointer-events: auto;
}
.thumb-rot-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--ink);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: all 0.15s var(--tx);
}
.thumb-rot-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.08);
}
.thumb-rot-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.preview-num {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 3px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: white;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  font-feature-settings: "tnum";
}



.crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.crop-bar {
  position: absolute;
  background: color-mix(in srgb, var(--bad) 55%, transparent);
  border: 1px dashed color-mix(in srgb, var(--bad) 80%, transparent);
  transition: width 0.08s linear, height 0.08s linear;
}
.crop-bar-t { top: 0; left: 0; right: 0; height: 0; }
.crop-bar-b { bottom: 0; left: 0; right: 0; height: 0; }
.crop-bar-l { top: 0; bottom: 0; left: 0; width: 0; }
.crop-bar-r { top: 0; bottom: 0; right: 0; width: 0; }



.preview-thumb.clickable {
  cursor: pointer;
  transition: all var(--tx-fast);
}
.preview-thumb.clickable:hover {
  border-color: var(--bad);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.preview-thumb.clickable.selected {
  border: 2px solid var(--bad);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent);
}


.preview-thumb.clickable.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bad) 22%, transparent);
  pointer-events: none;
  z-index: 1;
}


.preview-thumb.clickable.selected::before {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background-color: var(--bad);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4h8v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4zm2-2h4v2M3 4h10' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}



.file-list { margin-top: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.file-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r2);
}
.file-row-info { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.file-mark {
  width: 32px; height: 40px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-3);
  flex: none;
}
.file-meta { min-width: 0; }
.file-name { font-size: 13px; font-weight: 540; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-feature-settings: "tnum"; }
.file-x {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--tx-fast);
}
.file-x:hover { color: var(--bad); background: var(--bg-sunk); }



.opts {
  margin-top: var(--s5);
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
}
.opts h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: var(--s4);
}
.opt-row { display: flex; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.opt-row:last-child { margin-bottom: 0; }
.opt { flex: 1 1 160px; min-width: 0; }
.opt-label {
  display: block;
  font-size: 12px;
  font-weight: 540;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.opt-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--s3);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  transition: all var(--tx-fast);
}
.opt-input:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}
textarea.opt-input { height: auto; padding: var(--s3); font-family: ui-monospace, monospace; font-size: 12px; resize: vertical; }
select.opt-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2387858a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.actions {
  margin-top: var(--s6);
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  align-items: center;
}
.actions .btn { height: 44px; }

.progress {
  margin-top: var(--s5);
  height: 3px;
  background: var(--bg-sunk);
  border-radius: 2px;
  overflow: hidden;
  display: none;
}
.progress.on { display: block; }
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 200ms var(--tx);
  width: 0;
}
.status {
  margin-top: var(--s3);
  font-size: 12px;
  color: var(--ink-3);
  display: none;
}
.status.on { display: block; }

.success {
  margin-top: var(--s5);
  padding: var(--s5) var(--s6);
  background: var(--good-soft);
  border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
  border-radius: var(--r3);
  display: none;
  align-items: center;
  gap: var(--s4);
}
.success.on { display: flex; }
.success-mark {
  width: 32px; height: 32px;
  background: var(--good);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex: none;
}
.success-text h4 { font-size: 14px; margin-bottom: 2px; color: var(--ink); }
.success-text p { font-size: 13px; color: var(--ink-2); }



.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}
.page-thumb {
  position: relative;
  aspect-ratio: 0.707;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  overflow: hidden;
  cursor: grab;
  transition: all var(--tx-fast);
}
.page-thumb:hover { border-color: var(--ink); }
.page-thumb.selected { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 20%, transparent); }
.page-thumb.dragging { opacity: 0.4; }
.page-thumb canvas { width: 100%; height: 100%; object-fit: contain; background: white; }
.page-thumb-num {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: white;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  font-feature-settings: "tnum";
}



.why {
  padding: var(--s12) 0;
  background: var(--bg-cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5);
  margin-bottom: var(--s12);
}
.why-card {
  position: relative;
  padding: var(--s8) var(--s7) var(--s7);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  overflow: hidden;
}


.why-corner {
  position: absolute;
  top: 0; right: 0;
  width: 28px; height: 28px;
  background:
    linear-gradient(225deg, var(--bg-cream) 50%, transparent 50%),
    linear-gradient(225deg, transparent 50%, color-mix(in srgb, var(--ink) 8%, transparent) 50%);
}
.why-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: var(--s4);
  font-feature-settings: "tnum";
}
.why-card h3 { font-size: 22px; margin-bottom: var(--s3); }
.why-card p { font-size: 15px; line-height: 1.6; }

@media (max-width: 720px) { .why-grid { grid-template-columns: 1fr; } }

.cmp-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: var(--s5);
  text-align: center;
}
.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  overflow: hidden;
}
.cmp th, .cmp td {
  padding: var(--s4) var(--s5);
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.cmp th {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  background: var(--bg-cream);
}
.cmp th:not(:first-child),
.cmp td:not(:first-child) { text-align: center; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp .us { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cmp tbody tr:hover td { background: var(--bg-cream); }
.cmp tbody tr:hover .us { background: color-mix(in srgb, var(--accent) 8%, transparent); }

@media (max-width: 600px) { .cmp th, .cmp td { padding: var(--s3); font-size: 12px; } }



.how { padding: var(--s12) 0; }
.steps {
  list-style: none;
  padding: 0;
  max-width: 720px;
  margin: 0 auto;
}
.steps li {
  display: flex;
  gap: var(--s7);
  padding: var(--s7) 0;
  border-bottom: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: 0; }
.step-n {
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.steps h3 { font-size: 22px; margin-bottom: var(--s2); }
.steps p { font-size: 15px; line-height: 1.6; }



.about {
  padding: var(--s12) 0;
  background: var(--bg-cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about h2 { margin-bottom: var(--s7); font-size: 36px; }
.about p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: var(--s5);
  color: var(--ink-2);
}



.faq { padding: var(--s12) 0; }
.faq-list { margin-top: var(--s7); }
.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: var(--s5) 0;
}
.faq details:first-child { border-top: 1px solid var(--line-soft); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 540;
  color: var(--ink);
  letter-spacing: -0.012em;
  padding-right: var(--s4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--ink-3);
  transition: transform var(--tx-mid);
  width: 20px; text-align: center;
}
.faq details[open] summary::after { content: 'â€“'; color: var(--accent); }
.faq details p {
  margin-top: var(--s4);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 640px;
}



.cta {
  padding: var(--s11) 0;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}
.cta h2 {
  color: var(--bg);
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: var(--s7);
  letter-spacing: -0.025em;
}



.footer {
  padding: var(--s11) 0 var(--s7);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.ft-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s9);
  margin-bottom: var(--s9);
}
.ft-brand .brand { margin-bottom: var(--s3); }
.ft-tag { font-size: 14px; color: var(--ink-2); max-width: 280px; }
.footer h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s4);
  font-weight: 700;
}
.footer a {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color var(--tx-fast);
}
.footer a:hover { color: var(--accent); }
.ft-base {
  padding-top: var(--s6);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
@media (max-width: 720px) {
  .ft-grid { grid-template-columns: 1fr 1fr; gap: var(--s7); }
  .ft-brand { grid-column: 1 / -1; }
}



#toastHost {
  position: fixed;
  bottom: var(--s5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  box-shadow: var(--shadow-3);
  animation: toast-in 240ms var(--tx);
  max-width: calc(100vw - var(--s8));
}
.toast.bad { background: var(--bad); }
.toast button {
  background: rgba(255,255,255,0.18);
  color: inherit;
  padding: 4px var(--s3);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--tx-fast);
}
.toast button:hover { background: rgba(255,255,255,0.3); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}



.batch-banner {
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r2);
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: 13px;
  color: var(--ink);
}
.batch-count {
  font-weight: 600;
  color: var(--accent);
}



[data-theme="dark"] .brand-icon svg rect:first-of-type {
  fill: #f5f4f0; 

}
[data-theme="dark"] .brand-icon svg path[fill="white"] {
  fill: #0d0d0c; 

}
[data-theme="dark"] .brand-icon svg path[fill="#d4d2cd"] {
  fill: #2a2925; 

}
[data-theme="dark"] .brand-icon svg rect[fill="currentColor"]:not(:first-of-type) {
  fill: #0d0d0c; 

}



.cmp-note {
  margin-top: var(--s4);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
.ft-tm {
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-3);
  font-style: italic;
}



.proof {
  max-width: 720px;
  margin: 0 auto var(--s12);
  background: #0d0d0c;
  border: 1px solid #25241f;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-3);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}
[data-theme="dark"] .proof {
  background: #08080a;
  border-color: #2a2925;
}
.proof-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #18171a;
  border-bottom: 1px solid #25241f;
}
.proof-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.proof-dot-r { background: #ef4444; }
.proof-dot-y { background: #f59e0b; }
.proof-dot-g { background: #22c55e; }
.proof-title {
  flex: 1;
  text-align: center;
  color: #87858a;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
  font-feature-settings: normal;
}
.proof-body {
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: #d4d1ca;
}
.proof-line {
  display: block;
}
.proof-prompt {
  color: #d44a1c;
  font-weight: 700;
  margin-right: 8px;
}
.proof-out {
  color: #87858a;
}
.proof-ok {
  color: #4ec07f;
  font-weight: 600;
}
.proof-mono {
  color: #f5f4f0;
}
.proof-stamp {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #25241f;
  color: #d44a1c;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 11px;
}

@media (max-width: 600px) {
  .proof-body { padding: 12px 14px; font-size: 12px; }
  .proof-title { font-size: 10px; }
}



.pos-picker {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 120px;
  height: 150px; 

  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pos-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s var(--tx);
}
.pos-cell:hover {
  border-color: var(--ink-3);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}
.pos-cell.selected {
  background: var(--accent);
  border-color: var(--accent);
}
.pos-cell.selected::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}



.page-picker-wrap {
  margin-top: var(--s5);
}
.page-picker-toolbar {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s4);
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}
.page-picker-toolbar .picker-count {
  font-weight: 600;
  color: var(--accent);
  font-feature-settings: "tnum";
}
.page-picker-toolbar .picker-hint {
  color: var(--ink-3);
  font-size: 12px;
}
.btn-mini {
  padding: 4px 12px;
  font-size: 12px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s var(--tx);
}
.btn-mini:hover { border-color: var(--ink); color: var(--ink); }
.btn-mini.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }



.page-thumb.picker-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.page-thumb.picker-selected::before {
  content: 'âœ“';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}



.split-marker {
  position: relative;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.split-marker::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  transition: background 0.15s;
}
.split-marker:hover::before { background: var(--accent); }
.split-marker.active::before {
  background: var(--accent);
  width: 2px;
}
.split-marker-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px dashed var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-3);
  z-index: 1;
  transition: all 0.15s;
}
.split-marker:hover .split-marker-icon {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
}
.split-marker.active .split-marker-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  border-style: solid;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}




.slider-wrap { display: flex; flex-direction: column; gap: 6px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.slider-head .slider-value { font-weight: 600; color: var(--accent); font-feature-settings: "tnum"; font-size: 13px; }
.slider-input { width: 100%; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; margin: 0; padding: 0; }
.slider-input::-webkit-slider-runnable-track { height: 4px; background: var(--bg-sunk); border-radius: 2px; }
.slider-input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: var(--accent); border-radius: 50%; margin-top: -7px; border: 2px solid var(--bg-card); box-shadow: 0 1px 4px rgba(212,74,28,0.4); cursor: grab; transition: transform 0.1s; }
.slider-input::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }
.slider-input::-moz-range-track { height: 4px; background: var(--bg-sunk); border-radius: 2px; border: 0; }
.slider-input::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent); border: 2px solid var(--bg-card); border-radius: 50%; box-shadow: 0 1px 4px rgba(212,74,28,0.4); cursor: grab; }
.slider-input:focus { outline: 0; }
.slider-input:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 1px 4px rgba(212,74,28,0.4); }



.card-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.card-pick { cursor: pointer; background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; transition: all 0.15s var(--tx); text-align: left; font: inherit; color: inherit; }
.card-pick:hover { border-color: var(--ink-3); }
.card-pick.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-card)); }
.card-pick.selected::before { content: 'â—'; color: var(--accent); font-size: 14px; margin-right: 6px; }
.card-pick-title { font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.card-pick-sub { font-size: 11px; color: var(--ink-3); line-height: 1.4; }



.color-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid var(--bg-card); box-shadow: 0 0 0 1px var(--line); transition: all 0.15s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--bg-card); }




.ws-split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--s5);
  margin-top: var(--s2);
}
.ws-split-canvas {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  padding: var(--s5);
  min-height: 540px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ws-split-canvas .dz {
  width: 100%;
  background: var(--bg-sunk);
  border: 2px dashed var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: var(--r2);
}
.ws-split-canvas .dz:hover,
.ws-split-canvas .dz.over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-sunk));
}
.ws-split-canvas .preview-panel {
  width: 100%;
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
.ws-split-canvas .preview-panel.on { display: block; }
.ws-split-canvas .preview-head { margin-bottom: var(--s3); }
.ws-split-canvas .preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s3);
  max-height: 500px;
  overflow-y: auto;
}
.ws-split-canvas.has-files .dz { display: none; }

.ws-split-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  align-self: stretch;
}
.ws-split-sidebar h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin: 0 0 var(--s2);
}
.ws-split-sidebar .file-list {
  margin: 0 0 var(--s3);
}
.ws-split-actions {
  margin-top: auto;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}



.btn-action {
  width: 100%;
  height: 52px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: var(--r2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.15s var(--tx);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 50%, black), 0 4px 12px color-mix(in srgb, var(--accent) 25%, transparent);
}
.btn-action:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, black);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 50%, black), 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-action:active:not(:disabled) { transform: translateY(0); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; background: var(--ink-3); box-shadow: none; }
.btn-action svg { width: 18px; height: 18px; }



.btn-direction-row { display: flex; gap: 10px; }
.btn-direction {
  flex: 1;
  height: 96px;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: all 0.15s var(--tx);
}
.btn-direction:hover { border-color: var(--ink-3); }
.btn-direction.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}
.btn-direction.selected svg { color: var(--accent); }
.btn-direction svg { width: 36px; height: 36px; color: var(--ink-2); transition: color 0.15s; stroke-width: 1.6; }
.btn-direction-label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }

@media (max-width: 900px) {
  .ws-split { grid-template-columns: 1fr; }
  .ws-split-canvas { min-height: 320px; }
}







.sidebar-info {
  padding: 14px 16px;
  background: var(--bg-cream);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: var(--s4);
}
.sidebar-info svg {
  display: inline-block;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  color: var(--accent);
  margin-right: 4px;
}



.sidebar-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--s5) 0 var(--s3);
}
.sidebar-section-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sidebar-link {
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}
.sidebar-link:hover { color: var(--accent); }



.btn-action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: all 0.15s var(--tx);
  margin-bottom: 10px;
}
.btn-action-row:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-card));
}
.btn-action-row.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}
.btn-action-row .row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.btn-action-row .row-icon svg {
  width: 20px;
  height: 20px;
  color: white;
  stroke-width: 2;
}
.btn-action-row .row-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}



.card-stack-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-stack-v2 .card-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  transition: all 0.15s var(--tx);
}
.card-stack-v2 .card-row:hover { border-color: var(--ink-3); }
.card-stack-v2 .card-row.selected {
  border-color: var(--accent);
  background: var(--bg-cream);
}
.card-stack-v2 .card-row-text { flex: 1; }
.card-stack-v2 .card-row-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
.card-stack-v2 .card-row-sub {
  font-size: 12px;
  color: var(--ink-2);
}
.card-stack-v2 .card-row-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  transition: all 0.15s;
}
.card-stack-v2 .card-row.selected .card-row-check {
  border-color: var(--good);
  background: var(--good);
}
.card-stack-v2 .card-row.selected .card-row-check::after {
  content: '';
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}



.mode-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--s4);
}
.mode-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: all 0.15s var(--tx);
}
.mode-tile:hover { border-color: var(--ink-3); }
.mode-tile.selected {
  border-color: var(--accent);
  background: var(--bg-cream);
}
.mode-tile.selected::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--good);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}
.mode-tile svg {
  width: 28px;
  height: 28px;
  color: var(--ink-2);
  stroke-width: 1.5;
}
.mode-tile.selected svg { color: var(--accent); }
.mode-tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}



.pill-group {
  display: inline-flex;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}
.pill-btn {
  padding: 6px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 540;
  background: transparent;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.15s;
}
.pill-btn:hover { color: var(--ink); }
.pill-btn.selected {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 1px 2px rgba(0,0,0,0.05);
  font-weight: 600;
}



.preview-thumb.split-selected,
.page-thumb.split-selected {
  border-color: var(--good);
  box-shadow: 0 0 0 2px var(--good);
}
.preview-thumb.split-selected::before,
.page-thumb.split-selected::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--good);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}



.btn-action::after {
  content: '\2192';
  margin-left: 6px;
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px);
}







.wm-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
  font-weight: 700;
  white-space: nowrap;
  z-index: 4;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
  user-select: none;
}



.pn-overlay {
  position: absolute;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 4;
  font-feature-settings: "tnum";
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  white-space: nowrap;
}



.reorder-thumb {
  cursor: grab;
  transition: transform 0.15s var(--tx), box-shadow 0.15s var(--tx);
}
.reorder-thumb:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.reorder-thumb.dragging {
  opacity: 0.4;
  cursor: grabbing;
}




.preview-thumb.split-thumb canvas {
  border-radius: var(--r1);
}
.preview-thumb.split-thumb .preview-num {
  border-radius: 0 0 var(--r1) var(--r1);
  overflow: hidden;
}




.pos-cell.disabled {
  cursor: not-allowed;
  opacity: 0.3;
  background: var(--bg-sunk);
}
.pos-cell.disabled:hover {
  background: var(--bg-sunk);
  border-color: var(--line-soft);
}







.bates-overlay {
  position: absolute;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 4;
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  white-space: nowrap;
  font-family: ui-monospace, monospace;
}



.qr-overlay {
  position: absolute;
  background: repeating-linear-gradient(45deg, #000 0 2px, #fff 2px 4px);
  border: 1px solid #000;
  pointer-events: none;
  z-index: 4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.qr-placeholder { display: none; } 




.nup-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.nup-line {
  position: absolute;
  background: var(--accent);
}
.nup-line-v {
  top: 0;
  bottom: 0;
  width: 1.5px;
  transform: translateX(-50%);
}
.nup-line-h {
  left: 0;
  right: 0;
  height: 1.5px;
  transform: translateY(-50%);
}
.nup-cell-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  font-feature-settings: "tnum";
}



.reverse-thumb {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line-soft));
}
.reverse-thumb .preview-num {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 80%, black));
  font-size: 9px;
  font-weight: 600;
}




.nav-actions {
  position: relative;
}
.apps-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 580px;
  max-width: calc(100vw - var(--s5));
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--shadow-3);
  padding: var(--s5);
  z-index: 200;
  animation: apps-menu-in 180ms var(--tx);
  transform-origin: top right;
}
@keyframes apps-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.apps-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.apps-col-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s3);
  padding-left: var(--s2);
}
.apps-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 8px 10px;
  border-radius: var(--r2);
  color: var(--ink);
  text-decoration: none;
  transition: background var(--tx-fast), transform var(--tx-fast);
}
.apps-item:hover {
  background: var(--bg-cream);
}
.apps-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r2);
  background: var(--bg-sunk);
  border: 1px solid var(--line-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all var(--tx-fast);
}
.apps-item:hover .apps-icon {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  border-color: var(--accent);
  color: var(--accent);
}
.apps-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.apps-text strong {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.2;
}
.apps-text em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.3;
  margin-top: 2px;
}

.apps-menu-foot {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.apps-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--tx-fast);
}
.apps-install:hover {
  background: var(--accent);
}
.apps-foot-tag {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}



.iconbtn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

@media (max-width: 640px) {
  .apps-menu {
    width: calc(100vw - var(--s4));
    right: calc(-1 * var(--s2));
    padding: var(--s4);
  }
  .apps-menu-grid {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .apps-menu-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .apps-foot-tag {
    text-align: center;
  }
}




.tg.tg-highlight .tg-head h3 {
  color: var(--accent);
  transition: color 0.3s var(--tx);
}
.tg.tg-highlight .tg-line {
  background: var(--accent);
  transition: background 0.3s var(--tx);
}




.split-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: var(--s4);
}
.split-tab {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r2);
  padding: 12px 8px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  transition: all 0.15s var(--tx);
  position: relative;
}
.split-tab:hover { border-color: var(--ink-3); color: var(--ink); }
.split-tab svg {
  width: 22px;
  height: 22px;
  color: var(--ink-3);
  transition: color 0.15s;
}
.split-tab span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.split-tab.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
  color: var(--ink);
}
.split-tab.active svg { color: var(--accent); }
.split-tab.active::after {
  content: '\2713';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--good);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}



.split-pill-group {
  display: flex;
  gap: 6px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  margin-bottom: var(--s4);
}
.split-pill {
  flex: 1;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.15s;
}
.split-pill:hover { color: var(--ink); }
.split-pill.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 1px 0 var(--line), 0 1px 3px rgba(0,0,0,0.06);
}



.split-mode-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.split-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  transition: all 0.15s var(--tx);
}
.split-range-row:hover {
  background: color-mix(in srgb, var(--bg-cream) 70%, var(--bg-sunk));
}


.split-range-row.active-range {
  background: var(--bg-card);
  border: 2px solid hsl(var(--range-hue, 0), 70%, 50%);
  padding: 7px 9px; 

  box-shadow: 0 0 0 3px color-mix(in srgb, hsl(var(--range-hue, 0), 70%, 50%) 18%, transparent);
}
.split-range-row.active-range::before {
  content: 'Click pages \u2192';
  position: absolute;
  font-size: 10px;
  color: hsl(var(--range-hue, 0), 70%, 40%);
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
  margin-left: -8px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.split-range-row {
  position: relative;
}

.split-range-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  min-width: 60px;
}
.split-range-field {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.split-range-field span {
  font-size: 11px;
  color: var(--ink-3);
}
.split-range-field input {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-feature-settings: "tnum";
}
.split-range-field input:focus {
  outline: 0;
  border-color: var(--accent);
}
.split-range-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: all 0.15s;
}
.split-range-remove:hover {
  background: color-mix(in srgb, var(--bad) 15%, transparent);
  color: var(--bad);
}

.btn-add-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1.5px dashed var(--accent);
  border-radius: var(--r2);
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  align-self: flex-start;
}
.btn-add-range:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border-style: solid;
}

.split-merge-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s3);
  padding: 8px 10px;
  background: var(--bg-cream);
  border: 1px solid var(--line-soft);
  border-radius: var(--r2);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.split-merge-opt input {
  margin: 0;
  accent-color: var(--accent);
}

.split-info-line {
  margin-top: var(--s3);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r1);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
}

.split-hint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: var(--s2);
}
.split-hint strong { color: var(--accent); font-weight: 700; font-feature-settings: "tnum"; }



.split-size-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.split-size-row input {
  flex: 1;
}
.split-unit-toggle {
  display: inline-flex;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 2px;
}
.split-unit {
  padding: 0 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: var(--r1);
  cursor: pointer;
  color: var(--ink-3);
}
.split-unit.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}





.preview-thumb.split-in-range {
  outline: 3px solid var(--range-color, var(--accent));
  outline-offset: -3px;
  position: relative;
}
.preview-thumb.split-in-range::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--range-color, var(--accent));
  opacity: 0.10; 

  pointer-events: none;
  border-radius: inherit;
}



.preview-thumb.split-extracted {
  outline: 3px solid var(--good);
  outline-offset: -3px;
  position: relative;
}
.preview-thumb.split-extracted::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--good);
  opacity: 0.10;
  pointer-events: none;
  border-radius: inherit;
}
.preview-thumb.split-extracted .preview-num {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--good) 90%, black));
}



.split-range-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  border-radius: 4px;
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}



.split-range-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}



.split-thumb {
  cursor: default;
}
.split-thumb.selected {
  outline: 3px solid var(--good);
  outline-offset: -3px;
}




.preview-thumb.split-thumb {
  cursor: pointer;
}
.preview-thumb.split-thumb:hover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}




.pn-section {
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line-soft);
}
.pn-section:first-child { padding-top: 0; }
.pn-section:last-child { border-bottom: 0; padding-bottom: 0; }
.pn-section > h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 var(--s3);
}



.pn-radio-row {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
}
.pn-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.pn-radio input { display: none; }
.pn-radio-dot {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--bg-card);
  position: relative;
  transition: all 0.15s;
  flex: none;
}
.pn-radio input:checked + .pn-radio-dot {
  border-color: var(--good);
  background: var(--bg-card);
}
.pn-radio input:checked + .pn-radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--good);
}



.pn-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s3);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.pn-check input { display: none; }
.pn-check-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--bg-card);
  position: relative;
  flex: none;
}
.pn-check input:checked + .pn-check-box {
  background: var(--good);
  border-color: var(--good);
}
.pn-check input:checked + .pn-check-box::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}



.pn-two-col {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s5);
  align-items: start;
}
.pn-two-col > div h4 {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 var(--s2);
  color: var(--ink);
}



.pn-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: var(--s3);
  margin-bottom: var(--s2);
  font-size: 12px;
  color: var(--ink-2);
}
.pn-inline-field input.pn-num {
  width: 70px;
  height: 32px;
  padding: 0 8px;
  text-align: center;
  font-feature-settings: "tnum";
}
.pn-sub {
  font-size: 12px;
  color: var(--ink-2);
  margin: var(--s3) 0 var(--s2);
}
.pn-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}



.pn-format-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pn-format-row .pn-font {
  flex: 1;
  min-width: 110px;
  height: 32px;
  font-size: 12px;
}
.pn-size-row {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--bg-card);
  height: 32px;
}
.pn-size-btn {
  width: 28px;
  height: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  font-family: inherit;
}
.pn-size-btn:hover { color: var(--accent); background: var(--bg-cream); }
.pn-size-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  font-size: 12px;
  font-weight: 600;
  font-feature-settings: "tnum";
  color: var(--ink);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 30px;
}
.pn-fmt-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.pn-fmt-btn:hover { border-color: var(--ink-3); }
.pn-fmt-btn.on {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
  border-color: var(--accent);
  color: var(--accent);
}
.pn-color-btn {
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
}
.pn-color-letter {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.pn-color-bar {
  display: block;
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background: #333;
}









.esign-canvas-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  width: 100%;
  min-width: 0;
}
.esign-page-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}
.esign-strip-thumb {
  flex: none;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s;
}
.esign-strip-thumb:hover { border-color: var(--ink-3); }
.esign-strip-thumb.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
  color: var(--accent);
}
.esign-strip-thumb canvas {
  display: block;
  border-radius: 3px;
  background: white;
}

.esign-canvas-host {
  position: relative;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: var(--s3);
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  

  max-height: 80vh;
}
.esign-canvas-host canvas {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  display: block;
}
.esign-overlay {
  position: absolute;
  pointer-events: auto;
}

.esign-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0;
  padding: 8px 12px;
  background: var(--bg-cream);
  border-radius: var(--r1);
  border: 1px dashed var(--line);
}

.esign-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
}
.esign-tab {
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink-2);
}
.esign-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.esign-pane { display: flex; flex-direction: column; gap: 8px; }
#sigCanvas {
  width: 100%;
  height: auto;
  background: white;
  border: 1.5px dashed var(--line);
  border-radius: var(--r1);
  cursor: crosshair;
  touch-action: none;
}
.esign-pane-actions { display: flex; gap: 8px; align-items: center; }
.esign-pane-actions input[type=color] { width: 36px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r1); cursor: pointer; background: var(--bg-card); }

.esign-font-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.esign-font {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r1);
  padding: 8px;
  font-size: 22px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
  font-family: cursive;
}
.esign-font:hover { border-color: var(--ink-3); }
.esign-font.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

.esign-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px;
  background: var(--bg-sunk);
  border: 2px dashed var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  text-align: center;
  color: var(--ink-3);
  transition: all 0.15s;
}
.esign-upload-zone:hover, .esign-upload-zone.over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-sunk));
  color: var(--accent);
}
.esign-upload-zone span { font-size: 13px; font-weight: 500; color: var(--ink); }
.esign-upload-zone small { font-size: 11px; }

.esign-drag-card {
  background: var(--bg-cream);
  border: 2px solid var(--accent);
  border-radius: var(--r2);
  padding: 10px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.esign-drag-card:active { cursor: grabbing; }
.esign-drag-preview {
  background: white;
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r1);
  overflow: hidden;
}
.esign-drag-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.esign-drag-hint {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}



.esign-placement {
  position: absolute;
  border: 1.5px dashed transparent;
  cursor: move;
  user-select: none;
}
.esign-placement:hover {
  border-color: var(--accent);
}
.esign-placement img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.esign-resize-handle {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid white;
  border-radius: 50%;
  cursor: nwse-resize;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.btn-mini {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
}
.btn-mini:hover { border-color: var(--ink-3); color: var(--ink); }




.ws-split-sidebar #sigCanvas {
  width: 100%;
  height: 110px;
}
.ws-split-sidebar .esign-font {
  font-size: 18px;
  padding: 6px;
}
.ws-split-sidebar .esign-tabs {
  margin-bottom: var(--s2);
}
.ws-split-sidebar .esign-drag-card {
  margin-top: var(--s3);
}




.ed-canvas-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  width: 100%;
  min-width: 0;
}
.ed-page-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}
.ed-canvas-host {
  position: relative;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: var(--s3);
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-height: 80vh;
}
.ed-canvas-host canvas {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  display: block;
}
.ed-overlay {
  position: absolute;
  pointer-events: auto;
  cursor: default;
}
.ed-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0;
  padding: 8px 12px;
  background: var(--bg-cream);
  border-radius: var(--r1);
  border: 1px dashed var(--line);
}



.ed-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ed-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r2);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.15s;
}
.ed-tool:hover { border-color: var(--ink-3); color: var(--ink); }
.ed-tool.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  color: var(--accent);
}
.ed-tool svg {
  width: 18px;
  height: 18px;
}



.ed-options { display: flex; flex-direction: column; gap: 8px; }
.ed-options h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.ed-row { display: flex; gap: 8px; align-items: center; }
.ed-font-sel { flex: 1; }
.ed-size-row {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--bg-card);
}
.ed-size-btn {
  width: 28px;
  height: 32px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  font-family: inherit;
}
.ed-size-btn:hover { color: var(--accent); }
.ed-size-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  font-feature-settings: "tnum";
  color: var(--ink);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 30px;
}

.ed-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ed-color-row input[type=color] {
  width: 40px; height: 32px;
  padding: 0; border: 1px solid var(--line);
  border-radius: var(--r1); cursor: pointer; background: var(--bg-card);
}
.ed-color-label {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-2);
}

.ed-history-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ed-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
  font-feature-settings: "tnum";
}



.ed-anno {
  position: absolute;
  user-select: none;
  cursor: move;
  border: 1px dashed transparent;
  transition: border-color 0.15s;
}
.ed-anno:hover { border-color: var(--accent); }
.ed-anno-text {
  white-space: nowrap;
  padding: 2px 4px;
  cursor: move;
}
.ed-anno-text:hover { background: rgba(255,255,255,0.4); }
.ed-anno-line {
  cursor: move;
  border: 0;
}
.ed-anno-line:hover { outline: 1px dashed var(--accent); }




.preview-grid.input-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  align-items: start;
}
.preview-grid.input-preview.preview-doc {
  display: block;
  grid-template-columns: none;
}

.input-img-thumb {
  background: white;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-radius: 4px;
}
.input-img-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.doc-page {
  background: white;
  color: #1a1a1a;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 32px 36px;
  max-width: 720px;
  margin: 0 auto;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  overflow: auto;
  max-height: 70vh;
}
.doc-page h1, .doc-page h2, .doc-page h3, .doc-page h4 {
  font-weight: 600; margin: 0.6em 0 0.4em;
}
.doc-page h1 { font-size: 24px; }
.doc-page h2 { font-size: 20px; }
.doc-page h3 { font-size: 17px; }
.doc-page h4 { font-size: 14px; }
.doc-page p { margin-bottom: 0.8em; }
.doc-page ul, .doc-page ol { padding-left: 1.5em; margin-bottom: 0.8em; }
.doc-page li { margin-bottom: 0.3em; }
.doc-page strong, .doc-page b { font-weight: 700; }
.doc-page em, .doc-page i { font-style: italic; }
.doc-page a { color: #d44a1c; }
.doc-page table { border-collapse: collapse; width: 100%; margin: 0.8em 0; font-size: 13px; }
.doc-page th, .doc-page td { border: 1px solid #ddd; padding: 6px 8px; text-align: left; }
.doc-page th { background: #f5f3ee; font-weight: 600; }
.doc-page img { max-width: 100%; }
.doc-page hr { border: 0; border-top: 1px solid #ddd; margin: 1em 0; }
.doc-page blockquote {
  border-left: 3px solid #d44a1c;
  padding-left: 14px;
  margin: 0.8em 0;
  color: #555;
  font-style: italic;
}
.doc-page code {
  font-family: ui-monospace, 'Consolas', monospace;
  background: #f0eee9;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

.doc-page.text-page {
  font-family: ui-monospace, 'Consolas', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.doc-page.html-page {
  padding: 0;
  overflow: hidden;
  max-width: 720px;
  width: 100%;
}
.doc-page.html-page iframe.html-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: white;
}

.sheet-tabs {
  display: flex;
  gap: 4px;
  margin: -32px -36px 18px;
  padding: 8px 36px 0;
  border-bottom: 1px solid var(--line);
  background: #f9f7f1;
  flex-wrap: wrap;
}
.sheet-tab {
  background: transparent;
  border: 0;
  padding: 8px 14px 10px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: color .12s, border-color .12s;
}
.sheet-tab:hover { color: var(--ink); }
.sheet-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.sheet-pane[hidden] { display: none; }
.sheet-pane table {
  border: 1px solid #ccc;
  font-size: 12px;
}
.sheet-pane td, .sheet-pane th {
  border: 1px solid #e0e0e0;
  padding: 4px 8px;
}






.compare-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}
.compare-r {
  background: #fde8e8;
  color: #c0392b;
}
.compare-g {
  background: #e8fde8;
  color: #27ae60;
}
[data-theme="dark"] .compare-r { background: #3d1515; color: #e74c3c; }
[data-theme="dark"] .compare-g { background: #153d15; color: #2ecc71; }



.img-ed-canvas-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-1);
}
.img-ed-canvas-wrap canvas {
  display: block;
  max-width: 100%;
}



.blur-overlay {
  position: absolute;
  border: 2px dashed rgba(255,0,0,.7);
  background: rgba(255,0,0,.15);
  pointer-events: none;
  border-radius: 4px;
}



.wf-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
}
.wf-row select {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--ink-1);
  font-size: 13px;
}
.wf-row .file-x {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
  border-radius: 4px;
}
.wf-row .file-x:hover { color: #e74c3c; }



.bm-row {
  display: flex;
  gap: var(--s2);
  align-items: center;
  margin-bottom: var(--s2);
}
.bm-row input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--ink-1);
  font-size: 13px;
}
.bm-row input[type="number"] {
  max-width: 80px;
}

.brand-word {
  font-weight: 800;
  letter-spacing: -0.022em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5px;
}
.brand-word em {
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, #ff8a3d 0%, #f0432b 55%, #c2185b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f0432b;               

  padding: 0 0.02em;
}

:root {
  --bm-tile:  #1a1917;   

  --bm-page:  #ffffff;   

  --bm-accent:#f0432b;   

}
html[data-theme="dark"] {
  --bm-tile:  #ffffff;
  --bm-page:  #16150f;
  --bm-accent:#ff6a45;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bm-tile:  #ffffff;
    --bm-page:  #16150f;
    --bm-accent:#ff6a45;
  }
}
.brand-mark .bm-tile { fill: var(--bm-tile); }
.brand-mark .bm-page { fill: var(--bm-page); }
.brand-mark .bm-fold { fill: var(--bm-accent); }

.brand-mark .bm-bar  { fill: var(--bm-tile); }

.brand-icon svg {
  display: block;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover .brand-icon svg { transform: scale(1.05); }
.brand:hover .brand-word em { filter: saturate(1.12); }

.tg-grid .tool svg {
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), color .18s ease;
}
.tg-grid .tool:hover svg { transform: translateY(-1px) scale(1.09); }

.tg[data-cat="organise"]   { --cat: #2f7fd6; }  

.tg[data-cat="frompdf"]    { --cat: #7a4fd0; }  

.tg[data-cat="topdf"]      { --cat: #1f8f86; }  

.tg[data-cat="edit"]       { --cat: #e0791a; }  

.tg[data-cat="secure"]     { --cat: #2f9e63; }  

.tg[data-cat="imgconvert"] { --cat: #d63384; }  

.tg[data-cat="imgsize"]    { --cat: #c2185b; }  

.tg[data-cat="imgedit"]    { --cat: #b06a12; }  

.tg[data-cat] .tool svg { color: var(--cat); }
.tg[data-cat] .tg-num   { color: var(--cat); }
.tg[data-cat] .tg-line  { background: linear-gradient(90deg, var(--cat), transparent); opacity: .5; }

.tg[data-cat] .tool:hover {
  border-color: color-mix(in srgb, var(--cat) 45%, transparent);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--cat) 16%, transparent);
}

@media (prefers-color-scheme: dark) {
  .tg-grid .tool svg { filter: saturate(1.22) brightness(1.16); }
}
html[data-theme="dark"] .tg-grid .tool svg { filter: saturate(1.22) brightness(1.16); }

.hero-card {
  

  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-card) 97%, #000 3%) 0%,
      color-mix(in srgb, var(--bg-card) 92%, #000 8%) 100%);
  border-color: color-mix(in srgb, var(--line) 62%, #000 38%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 24px -6px rgba(0, 0, 0, 0.16),
    0 18px 48px -18px rgba(0, 0, 0, 0.20);
}

.hero-card-row {
  border-bottom: 1px dashed color-mix(in srgb, var(--ink) 34%, transparent);
}
.hero-card-row:last-of-type { border-bottom: 0; }

.hero-card::before {
  background: repeating-linear-gradient(90deg,
    color-mix(in srgb, var(--bg-card) 97%, #000 3%) 0 8px,
    transparent 8px 16px);
  background-size: 16px 8px;
}

html[data-theme="dark"] .hero-card {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-card) 94%, #fff 6%) 0%,
      var(--bg-card) 100%);
  border-color: color-mix(in srgb, var(--line) 55%, #fff 45%);
  box-shadow: 0 10px 34px -10px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .hero-card-row {
  border-bottom-color: color-mix(in srgb, var(--ink) 30%, transparent);
}
html[data-theme="dark"] .hero-card::before {
  background: repeating-linear-gradient(90deg,
    color-mix(in srgb, var(--bg-card) 94%, #fff 6%) 0 8px,
    transparent 8px 16px);
  background-size: 16px 8px;
}

.preview-grid.pv-solo {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  padding: var(--s3);
  text-align: center;
}
.preview-grid.pv-solo canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 14px -4px rgba(0, 0, 0, 0.22);
}

.ed-tool-grid { grid-template-columns: repeat(3, 1fr) !important; }
.ed-tool { -webkit-tap-highlight-color: transparent; user-select: none; }
.ed-tool:active { transform: scale(0.96); }

.em-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-top: var(--s1);
}
.em-pick {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r1, 6px);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.em-pick:hover { transform: scale(1.14); border-color: var(--ink-3); }
.em-pick.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
}

.crop-row { margin-top: var(--s3); }
.crop-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.crop-row-head .crop-val {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.crop-row input[type="range"] { width: 100%; margin-top: 6px; }

.support {
  padding: var(--s9, 72px) 0;
  border-top: 1px solid var(--line);
}
.sup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5, 24px);
}
@media (max-width: 820px) {
  .sup-grid { grid-template-columns: 1fr; }
}
.sup-card {
  padding: var(--s6, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r3, 14px);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-card) 98%, #000 2%) 0%,
      color-mix(in srgb, var(--bg-card) 93%, #000 7%) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px -12px rgba(0,0,0,.16);
}
html[data-theme="dark"] .sup-card {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-card) 94%, #fff 6%) 0%, var(--bg-card) 100%);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.55);
}
.sup-card h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: var(--s2, 8px) 0 var(--s3, 12px);
  letter-spacing: -0.015em;
}
.sup-card > p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2, #555);
  margin: 0 0 var(--s4, 18px);
}
.sup-form {
  display: flex;
  gap: var(--s2, 8px);
  flex-wrap: wrap;
}
.sup-form input[type="email"] {
  flex: 1 1 210px;
  min-width: 0;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: var(--r2, 9px);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.sup-form .btn { flex: 0 0 auto; }
.sup-actions {
  display: flex;
  gap: var(--s2, 8px);
  flex-wrap: wrap;
  align-items: center;
}
.sup-tip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sup-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3, #87858a);
  margin: var(--s3, 12px) 0 0;
}

.tg-grid .tool.tool-flag {
  border-color: color-mix(in srgb, var(--cat, var(--accent)) 55%, transparent);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--cat, var(--accent)) 7%, var(--bg-card)) 0%,
      var(--bg-card) 100%);
}
.tg-grid .tool.tool-flag:hover {
  border-color: var(--cat, var(--accent));
  box-shadow: 0 3px 16px color-mix(in srgb, var(--cat, var(--accent)) 24%, transparent);
}

.sup-card-wide { grid-column: 1 / -1; }
.sup-form-col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.bug-grid { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: 14px; }
.bug-span { grid-column: 1 / -1; }
@media (max-width: 720px) { .bug-grid { grid-template-columns: 1fr; } }
.bug-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); margin-bottom: 6px;
}
.bug-select, .bug-text {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.bug-text { resize: vertical; min-height: 76px; line-height: 1.5; }
.bug-select:focus-visible, .bug-text:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.bug-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.bug-row-end { justify-content: space-between; gap: 10px; }
.bug-radio, .bug-check {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--text); cursor: pointer; user-select: none;
}
.bug-radio input, .bug-check input { accent-color: var(--accent); margin: 0; cursor: pointer; }
.bug-link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13px;
  color: var(--accent); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.bug-link:hover { opacity: .78; }
.bug-diag {
  margin: 0; padding: 12px 14px; border-radius: 10px;
  background: var(--bg2, rgba(127,127,127,.08)); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.65; color: var(--muted);
  white-space: pre-wrap; word-break: break-word; max-height: 190px; overflow: auto;
}
.bug-submit { align-self: flex-start; }
.sup-note-ok { color: var(--accent); }
.sup-note-bad { color: #d9534f; }

.bug-req { font-weight: 500; color: var(--muted); opacity: .8; text-transform: none; letter-spacing: 0; }
input.bug-select { -webkit-appearance: none; appearance: none; }
