@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* ==========================================================================
   Free Image Scaler - site.css
   One design system for every page: tools, guides, legal pages, the blog and
   articles (rendered by the Netlify functions) and the 404 pages. Page-level
   stylesheets were retired so the header, footer, buttons and typography can
   never drift apart between pages again.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #15173D;
  --ink-2: #33365c;
  --text: #4a4d6b;
  --muted: #6e7191;
  --faint: #9a9cb5;
  --line: #e8e5f0;
  --line-2: #f0edf6;
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f7f4fb;
  --surface-3: #f1ecf7;
  --brand: #982598;
  --brand-600: #7d1c7e;
  --brand-700: #5f1460;
  --brand-50: #faf1fa;
  --brand-100: #f3e1f3;
  --accent: #E491C9;
  --success: #15803d;
  --success-bg: #ecfdf3;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --info: #3538cd;
  --info-bg: #eef4ff;
  --grad: linear-gradient(135deg, #15173D 0%, #982598 58%, #E491C9 100%);
  --grad-btn: linear-gradient(135deg, #a42aa4 0%, #7a1f7b 55%, #2a1d57 100%);
  --grad-soft: linear-gradient(135deg, rgba(152,37,152,.08), rgba(228,145,201,.10));
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(21,23,61,.06);
  --shadow-sm: 0 1px 3px rgba(21,23,61,.06), 0 1px 2px rgba(21,23,61,.04);
  --shadow: 0 8px 24px -6px rgba(21,23,61,.10), 0 2px 6px rgba(21,23,61,.04);
  --shadow-lg: 0 24px 60px -16px rgba(21,23,61,.18), 0 6px 18px -6px rgba(21,23,61,.08);
  --shadow-brand: 0 10px 28px -8px rgba(152,37,152,.45);
  --ring: 0 0 0 4px rgba(152,37,152,.16);
  --header-h: 68px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo,
          "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* not "hidden": that turns body into a scroll container and breaks position:sticky */
}
main { flex: 1 0 auto; display: block; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-700); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; font-weight: 750; -webkit-hyphens: auto; hyphens: auto; }
/* Long compound words (German, etc.) must never push a narrow phone screen sideways */
h1, h2, h3, h4, h5, h6, p, li, td, th, label, summary { overflow-wrap: break-word; }
strong, b { color: var(--ink-2); font-weight: 700; }
::selection { background: rgba(152,37,152,.18); color: var(--ink); }
:focus-visible { outline: 3px solid rgba(152,37,152,.55); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.wrap.narrow { max-width: 880px; }

/* ---------- Buttons ---------- */
.btn, button.btn-primary, button.btn-secondary, .btn-download, form button[type="submit"] {
  --btn-bg: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.25rem;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.2; letter-spacing: -.005em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-primary, button.btn-primary, form button[type="submit"] {
  background: var(--grad-btn); background-size: 160% 160%; background-position: 0% 50%;
  color: #fff; box-shadow: var(--shadow-brand);
}
.btn-primary:hover, button.btn-primary:hover, form button[type="submit"]:hover {
  color: #fff; transform: translateY(-1px); background-position: 100% 50%;
  box-shadow: 0 16px 34px -10px rgba(152,37,152,.55);
}
.btn-secondary, button.btn-secondary {
  background: var(--surface); color: var(--ink-2); border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover, button.btn-secondary:hover { border-color: #d8d2e6; background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.btn-download {
  background: linear-gradient(135deg, #16a34a, #15803d); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(22,163,74,.6);
}
.btn-download:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(22,163,74,.6); }
.btn:active, button.btn-primary:active, button.btn-secondary:active, .btn-download:active, form button[type="submit"]:active { transform: translateY(0) scale(.985); }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1rem; border-radius: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Icons drawn with CSS masks so button labels stay pure, translatable text */
#processBtn::before, #bulkProcessBtn::before, #compressBtn::before, #cropBtn::before, #generateBtn::before, .btn-download::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
#processBtn, #bulkProcessBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z'/%3E%3Cpath d='M19 17l.8 2.2L22 20l-2.2.8L19 23l-.8-2.2L16 20l2.2-.8z'/%3E%3C/svg%3E"); }
#compressBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14h6v6'/%3E%3Cpath d='M20 10h-6V4'/%3E%3Cpath d='M14 10l7-7'/%3E%3Cpath d='M3 21l7-7'/%3E%3C/svg%3E"); }
#cropBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2v14a2 2 0 0 0 2 2h14'/%3E%3Cpath d='M18 22V8a2 2 0 0 0-2-2H2'/%3E%3C/svg%3E"); }
#generateBtn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Cpath d='M14 14h3v3h-3zM20 14v.01M14 20h.01M17 20h4v-3'/%3E%3C/svg%3E"); }
.btn-download { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E"); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(232,229,240,.8);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(21,23,61,.35); background: rgba(255,255,255,.92); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); flex: none; border-radius: 12px; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; transition: transform .5s var(--ease-out); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-name {
  font-weight: 800; font-size: 1.12rem; letter-spacing: -.025em; white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.main-nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; align-items: center; gap: .15rem; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  height: 40px; padding: 0 .85rem; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-link:hover, .nav-dropdown.open > .nav-link { background: var(--surface-3); color: var(--ink); }
.nav-link[aria-current="page"], .nav-link.is-active { color: var(--brand); }
.nav-link .caret { width: 14px; height: 14px; transition: transform .25s var(--ease); opacity: .7; }
.nav-dropdown { position: relative; }
.nav-dropdown.open > .nav-link .caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  min-width: 260px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px) scale(.98); transform-origin: top center;
  transition: opacity .2s var(--ease), transform .25s var(--ease-out), visibility 0s linear .25s;
  z-index: 200;
}
.nav-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-dropdown.open > .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
@media (hover: hover) and (min-width: 1025px) {
  .nav-dropdown:hover > .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
  .nav-dropdown:hover > .nav-link { background: var(--surface-3); color: var(--ink); }
  .nav-dropdown:hover > .nav-link .caret { transform: rotate(180deg); }
}
.nav-dropdown-menu.mega { width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
.mega-item { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem; border-radius: 12px; color: var(--ink); transition: background-color .2s var(--ease); }
.mega-item:hover { background: var(--surface-2); color: var(--ink); }
.mega-item strong { display: block; font-size: .93rem; color: var(--ink); font-weight: 700; line-height: 1.3; }
.mega-item small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; margin-top: .15rem; }
.mega-icon, .tool-icon {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--brand); border: 1px solid var(--brand-100);
  transition: transform .3s var(--ease-out), background .3s var(--ease);
}
.mega-icon svg, .tool-icon svg { width: 20px; height: 20px; }
.mega-item:hover .mega-icon { transform: scale(1.06) rotate(-4deg); background: var(--grad); color: #fff; border-color: transparent; }
.list-menu a { display: block; padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.list-menu a:hover { background: var(--surface-2); color: var(--brand); }
.list-menu a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }

.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.lang-menu .nav-dropdown-menu { left: auto; right: 0; transform: translateY(6px) scale(.98); transform-origin: top right; min-width: 200px; }
.lang-menu.open > .nav-dropdown-menu { transform: translateY(0) scale(1); }
@media (hover: hover) and (min-width: 1025px) { .lang-menu:hover > .nav-dropdown-menu { transform: translateY(0) scale(1); } }
.lang-toggle { gap: .4rem; padding: 0 .7rem; border: 1px solid var(--line); background: var(--surface); }
.lang-toggle svg.globe { width: 17px; height: 17px; opacity: .8; }
.lang-code { font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.lang-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lang-list a span.code { font-size: .72rem; color: var(--faint); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lang-list a[aria-current="true"] { background: var(--brand-50); color: var(--brand); }

.btn-support { min-height: 40px; padding: .5rem .95rem; font-size: .88rem; border-radius: 11px; background: var(--ink); color: #fff; box-shadow: 0 6px 18px -8px rgba(21,23,61,.55); }
.btn-support:hover { color: #fff; background: #23265a; transform: translateY(-1px); }
.btn-support svg { width: 16px; height: 16px; color: var(--accent); transition: transform .3s var(--ease-out); }
.btn-support:hover svg { transform: scale(1.18); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; position: relative; flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 50%; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); content: "";
  transition: transform .3s var(--ease-out), opacity .2s, top .3s var(--ease-out);
}
.nav-toggle span { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle span::before { top: -6px; transform: translateX(-50%); }
.nav-toggle span::after { top: 6px; transform: translateX(-50%); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: rgba(251,250,255,.98);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem clamp(16px, 4vw, 32px) 2.5rem;
  opacity: 0; transform: translateY(-8px); visibility: hidden;
  transition: opacity .25s var(--ease), transform .3s var(--ease-out), visibility 0s linear .3s;
}
.mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.mobile-nav h2 { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 750; margin: 1.4rem 0 .6rem; }
.mobile-tools { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: .6rem; }
.mobile-tools a { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .55rem; min-height: 112px; padding: .9rem .6rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .88rem; line-height: 1.25; overflow-wrap: break-word; }
.mobile-tools a[aria-current="page"] { border-color: var(--brand); background: var(--brand-50); }
.mobile-tools a:active { transform: scale(.98); }
.mobile-links { list-style: none; display: grid; gap: .1rem; }
.mobile-links a { display: flex; align-items: center; justify-content: space-between; padding: .8rem .2rem; border-bottom: 1px solid var(--line-2); color: var(--ink-2); font-weight: 600; }
.mobile-links a::after { content: "→"; color: var(--faint); font-weight: 500; }
.mobile-langs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.mobile-langs a { padding: .65rem .8rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.mobile-langs a[aria-current="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.mobile-nav .btn-support { width: 100%; margin-top: 1.4rem; min-height: 50px; }
body.nav-open { overflow: hidden; }

@media (max-width: 1180px) {
  .btn-support .label { display: none; }
  .btn-support { padding: .5rem .7rem; }
}
@media (max-width: 1024px) {
  .main-nav, .header-actions .lang-menu, .header-actions .btn-support { display: none; }
  .nav-toggle { display: inline-block; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 380px) { .brand-name { font-size: 1rem; } .brand img { width: 34px; height: 34px; } }

/* ---------- Hero backgrounds ---------- */
.tool-hero, .page-hero { position: relative; isolation: isolate; overflow: hidden; }
.tool-hero::before, .page-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 140%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 15% 30%, rgba(152,37,152,.16), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(228,145,201,.22), transparent 70%),
    radial-gradient(40% 50% at 60% 80%, rgba(21,23,61,.08), transparent 70%);
  filter: blur(10px);
  animation: meshDrift 22s var(--ease) infinite alternate;
}
.tool-hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(21,23,61,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 85%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 85%);
}
@keyframes meshDrift {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2%, 3%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1.02); }
}

/* ---------- Tool pages ---------- */
.tool-hero { padding: 1.6rem 0 1.2rem; text-align: center; }
.tool-switcher {
  display: inline-flex; gap: .25rem; padding: .3rem; margin-bottom: 1.1rem;
  background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-sm); max-width: 100%; flex-wrap: nowrap; justify-content: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tool-switcher a {
  display: inline-flex; align-items: center; gap: .45rem; flex: none;
  padding: .5rem .8rem; border-radius: 999px; font-size: .84rem; font-weight: 650; color: var(--ink-2); white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.tool-switcher a svg { width: 16px; height: 16px; opacity: .85; }
.tool-switcher a:hover { background: var(--surface-3); color: var(--ink); }
.tool-switcher a[aria-current="page"] { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -6px rgba(21,23,61,.5); }
/* Phone tool picker: hidden on desktop, where the pill bar above is used */
.tool-picker, .tool-sheet-backdrop, .tool-sheet-head { display: none; }
.tool-hero h1 {
  font-size: clamp(1.55rem, 1.1rem + 2vw, 2.45rem); font-weight: 800; letter-spacing: -.03em; max-width: 920px; margin: 0 auto .55rem;
  text-wrap: balance;
}
.tool-lead { max-width: 760px; margin: 0 auto; font-size: clamp(.92rem, .88rem + .2vw, 1.02rem); color: var(--muted); text-wrap: pretty; }
.trust-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem .6rem; margin-top: .95rem; }
.trust-chips li {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 650; color: var(--ink-2);
  padding: .3rem .7rem .3rem .5rem; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 999px;
}
.trust-chips svg { width: 15px; height: 15px; color: var(--success); }

.tool-wrapper {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); margin-bottom: 3.5rem;
}
.tool-wrapper::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(152,37,152,.45), rgba(228,145,201,.2) 35%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.tool-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tool-content > .section { padding: clamp(18px, 2.6vw, 32px); min-width: 0; }
.tool-content > .section-left { border-right: 1px solid var(--line-2); }
.tool-content > .section:not(.section-left) {
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 70%);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
@media (min-width: 901px) and (min-height: 700px) {
  .tool-content { align-items: start; }
  .tool-content > .section-preview { position: sticky; top: calc(var(--header-h) + 16px); background: transparent; }
}
.section-foot { margin-top: 1.4rem; font-size: .93rem; color: var(--muted); }
.section > h2, .tool-subhead {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem !important; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--muted) !important;
  margin: 0 0 .9rem;
}
.section > h2::before, .tool-subhead::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--brand-50); }
.section-left > h2, .tool-subhead { margin-top: 1.5rem; }

/* Upload */
input[type="file"] { display: none; }
.upload-area {
  position: relative; cursor: pointer; text-align: center;
  padding: clamp(1.5rem, 3vw, 2.4rem) 1.25rem;
  border: 2px dashed #d9d2e7; border-radius: 18px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(152,37,152,.06), transparent 60%),
    var(--surface);
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease-out), box-shadow .25s var(--ease);
}
.upload-area:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(152,37,152,.6); }
.upload-area.is-dragover { border-color: var(--brand); border-style: solid; background: var(--brand-50); box-shadow: var(--ring); transform: scale(1.01); }
.upload-icon {
  width: 60px; height: 60px; margin: 0 auto .9rem; border-radius: 18px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-brand);
  font-size: 0; transition: transform .4s var(--ease-out);
}
.upload-icon svg { width: 28px; height: 28px; }
.upload-area:hover .upload-icon { transform: translateY(-3px) rotate(-4deg); }
.upload-area.is-dragover .upload-icon { animation: bob 1s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.upload-text { font-weight: 750; color: var(--ink); font-size: 1.05rem; margin-bottom: .25rem; }
.upload-subtext { font-size: .84rem; color: var(--muted); }
#singleUploadWrap, #bulkUploadWrap, .upload-area { margin-bottom: 1.1rem; }

/* Mode tabs (segmented) */
.mode-tabs, .type-tabs {
  display: flex; gap: .25rem; padding: .3rem; margin-bottom: 1.1rem;
  background: var(--surface-3); border-radius: 13px;
}
.mode-tab, .type-tab {
  flex: 1 1 0; min-width: 0; min-height: 40px; padding: .45rem .6rem; border: 0; border-radius: 10px; background: transparent;
  font-size: .87rem; font-weight: 650; color: var(--muted); cursor: pointer; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.mode-tab:hover, .type-tab:hover { color: var(--ink); }
.mode-tab.active, .type-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Controls */
.control-group { margin-bottom: 1.05rem; }
.control-label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 650; color: var(--ink-2); margin-bottom: .45rem; }
.control-value {
  font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--brand);
  background: var(--brand-50); border: 1px solid var(--brand-100); padding: .1rem .5rem; border-radius: 999px; min-width: 2.6em; text-align: center;
}
select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea {
  width: 100%; min-height: 46px; padding: .65rem .9rem;
  border: 1px solid #ddd8e8; border-radius: 12px; background-color: var(--surface);
  font-size: .95rem; color: var(--ink); line-height: 1.4;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
  -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7191' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
}
textarea { min-height: 96px; resize: vertical; }
select:hover, input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, input[type="number"]:hover, textarea:hover { border-color: #c9c1db; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
::placeholder { color: var(--faint); opacity: 1; }
input[type="color"] {
  width: 100%; height: 46px; padding: 4px; border: 1px solid #ddd8e8; border-radius: 12px; background: var(--surface); cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 8px; }

/* Range slider with filled track (--fill set by nav.js) */
input[type="range"] {
  --fill: 50%;
  width: 100%; height: 22px; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) 0 var(--fill), #e7e2ef var(--fill) 100%);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: #e7e2ef; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--brand); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 8px rgba(152,37,152,.35);
  transition: transform .15s var(--ease), box-shadow .15s;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 8px rgba(152,37,152,.35);
}
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(152,37,152,.14); }
input[type="range"]:focus { outline: none; box-shadow: none; }

.sliders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.slider-item { padding: .55rem .7rem .35rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.slider-item .control-label { margin-bottom: .1rem; font-size: .82rem; }

.button-group { display: grid; grid-template-columns: 1fr auto; gap: .65rem; margin-top: 1.2rem; }
.button-group > button:first-child { width: 100%; }
.btn-download { width: 100%; margin-top: .75rem; }
.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .75rem; }
.download-row .btn-download { margin-top: 0; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.options-grid .control-group:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Collapsible enhancement sliders (open on desktop, collapsed on phones) */
.enhance-panel { margin: 1.3rem 0 .4rem; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.enhance-summary {
  display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; cursor: pointer; list-style: none;
  border-radius: 14px; user-select: none; -webkit-tap-highlight-color: transparent; transition: background-color .2s;
}
.enhance-summary::-webkit-details-marker { display: none; }
.enhance-summary::marker { content: ""; }
.enhance-summary:hover { background: var(--surface-2); }
.enhance-summary .tool-subhead { margin: 0 !important; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.enhance-count { min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; }
.enhance-chevron { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3) center / 14px no-repeat; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23982598' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); transition: transform .3s var(--ease-out); flex: none; }
.enhance-panel[open] .enhance-chevron { transform: rotate(180deg); }
.enhance-panel .sliders-grid { padding: 0 .7rem .7rem; margin-bottom: 0; }
.enhance-panel[open] .sliders-grid { animation: slideDown .3s var(--ease-out); }

/* Preview */
.preview-box {
  position: relative; width: 100%; min-height: 320px; margin-bottom: 1.1rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f3f0f8 25%, transparent 25%), linear-gradient(-45deg, #f3f0f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f0f8 75%), linear-gradient(-45deg, transparent 75%, #f3f0f8 75%);
  background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.preview-box img, .preview-box canvas, .preview-box svg { max-width: 100%; max-height: 520px; object-fit: contain; animation: popIn .5s var(--ease-out); }
@keyframes popIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.preview-empty { display: flex; flex-direction: column; align-items: center; gap: .8rem; color: var(--faint); text-align: center; padding: 2rem 1.2rem; font-size: .92rem; font-weight: 550; max-width: 320px; }
.preview-empty::before {
  content: ""; width: 64px; height: 64px; border-radius: 20px; background: var(--surface-3) center / 30px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a59fbd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}

/* Before / after comparison (upscaler result) */
.compare {
  --pos: 50%;
  position: relative; display: inline-block; max-width: 100%; line-height: 0;
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  border-radius: 10px; overflow: hidden; animation: popIn .5s var(--ease-out);
}
.preview-box .compare img { animation: none; }
.compare-after { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; }
.preview-box .compare-before {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: fill;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(21,23,61,.18), 0 0 12px rgba(0,0,0,.25); pointer-events: none; }
.compare-knob {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--brand);
  box-shadow: 0 6px 18px rgba(21,23,61,.3), 0 0 0 4px rgba(255,255,255,.35);
  transition: transform .2s var(--ease-out);
}
.compare-knob svg { width: 20px; height: 20px; }
.compare:hover .compare-knob, .compare:active .compare-knob { transform: scale(1.1); }
.compare-label {
  position: absolute; top: 10px; padding: .28rem .6rem; border-radius: 999px; line-height: 1.2;
  font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  background: rgba(21,23,61,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
}
.compare-label-before { left: 10px; }
.compare-label-after { right: 10px; background: rgba(152,37,152,.78); }
.compare-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); white-space: nowrap; line-height: 1.2;
  padding: .35rem .75rem; border-radius: 999px; font-size: .76rem; font-weight: 650; color: #fff;
  background: rgba(21,23,61,.7); pointer-events: none; transition: opacity .4s var(--ease);
  max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis;
}
.compare.is-touched .compare-hint { opacity: 0; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; margin: 0; }
.compare:focus-within { outline: 3px solid rgba(152,37,152,.55); outline-offset: 2px; }

/* Status, progress, info */
.status-message {
  display: none; position: relative; padding: .75rem .9rem .75rem 2.6rem; border-radius: 12px; margin-bottom: 1rem;
  font-size: .88rem; font-weight: 550; line-height: 1.45; border: 1px solid; animation: slideDown .35s var(--ease-out);
}
.status-message::before { content: ""; position: absolute; left: .85rem; top: .8rem; width: 18px; height: 18px; border-radius: 50%; background: currentColor; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
.status-message.success { display: block; background: var(--success-bg); color: var(--success); border-color: #bbf0cf; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E"); }
.status-message.error { display: block; background: var(--danger-bg); color: var(--danger); border-color: #fecdca; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E"); }
.status-message.info { display: block; background: var(--info-bg); color: var(--info); border-color: #d1e0ff; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E"); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.loading { display: none; text-align: center; padding: 1.4rem 1rem 1.2rem; margin-bottom: 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.loading p { font-weight: 650; color: var(--ink-2); font-size: .92rem; margin-bottom: .8rem; }
.spinner { width: 44px; height: 44px; margin: 0 auto .9rem; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 25%, var(--brand) 60%, var(--accent)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-outer { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-bar-inner { position: relative; height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width .35s var(--ease); overflow: hidden; }
.progress-bar-inner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.progress-text { margin-top: .55rem; font-size: .8rem; color: var(--muted); min-height: 1.2em; word-break: break-word; }

.image-info, .qr-info { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .4rem 1rem; box-shadow: var(--shadow-xs); }
.info-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; font-size: .88rem; color: var(--muted); border-bottom: 1px dashed var(--line); }
.info-row:last-child, .info-row:last-of-type { border-bottom: 0; }
.info-row strong { color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.info-row strong.reduction { color: var(--success); }
.warning-row { font-size: .82rem; color: var(--warning); background: var(--warning-bg); border-radius: 10px; padding: .55rem .7rem; margin: .4rem 0 .6rem; }

/* Bulk list */
.bulk-file-list { display: grid; gap: .5rem; margin: -.2rem 0 1rem; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.bulk-file-list:empty { display: none; }
.bulk-file-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto 32px; align-items: center; gap: .65rem; padding: .45rem .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; animation: slideDown .3s var(--ease-out); }
.bulk-file-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); }
.bulk-file-name { font-size: .82rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-file-status { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.bulk-file-status.status-loading, .bulk-file-status.status-pending { background: var(--surface-3); color: var(--muted); }
.bulk-file-status.status-processing { background: var(--info-bg); color: var(--info); }
.bulk-file-status.status-done { background: var(--success-bg); color: var(--success); }
.bulk-file-status.status-error { background: var(--danger-bg); color: var(--danger); }
.bulk-file-remove { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--faint); cursor: pointer; font-size: .9rem; transition: background-color .2s, color .2s; }
.bulk-file-remove:hover { background: var(--danger-bg); color: var(--danger); }

/* Compressor */
.compress-stage, .crop-stage { display: none; }
.compress-stage.active, .crop-stage.active { display: block; animation: slideDown .4s var(--ease-out); }
.original-info { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; padding: .75rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .85rem; color: var(--muted); }
.original-info strong { color: var(--ink); }
.mode-panel { display: none; }
.mode-panel.active { display: block; }
.estimate-box { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); font-size: .88rem; color: var(--ink-2); }
.estimate-box strong { color: var(--brand); font-size: 1rem; font-variant-numeric: tabular-nums; }
.kb-input-row { display: flex; align-items: center; gap: .6rem; }
.kb-input-row input { flex: 1; }
.kb-input-row span { font-size: .85rem; color: var(--muted); font-weight: 700; padding: 0 .4rem; }
.target-note { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.png-note { display: none; font-size: .82rem; color: var(--warning); background: var(--warning-bg); border: 1px solid #fde68a; border-radius: 10px; padding: .55rem .75rem; margin-top: .6rem; }
.png-note.visible { display: block; }

/* Cropper */
.image-frame { max-height: 480px; overflow: hidden; background: #0f1030; border-radius: 16px; }
.image-frame img { display: block; max-width: 100%; }
.ratio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: .9rem; }
.ratio-btn {
  min-height: 40px; padding: .45rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: .8rem; font-weight: 650; color: var(--ink-2); cursor: pointer; line-height: 1.25;
  transition: all .2s var(--ease);
}
.ratio-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.ratio-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 14px -6px rgba(21,23,61,.55); }
.tool-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin: 0 0 1rem; }
.icon-btn { min-height: 42px; padding: .45rem .4rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 650; color: var(--ink-2); cursor: pointer; transition: all .2s var(--ease); }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.icon-btn:active { transform: scale(.97); }
.cropper-view-box { outline: 2px solid rgba(228,145,201,.95) !important; }
/* Crop handles: large invisible touch targets with a clear visible dot, and
   wide grab zones along every edge, so resizing is easy on a phone. */
.cropper-line { background: transparent !important; opacity: 1 !important; }
.cropper-line.line-e { right: -12px !important; width: 24px !important; }
.cropper-line.line-w { left: -12px !important; width: 24px !important; }
.cropper-line.line-n { top: -12px !important; height: 24px !important; }
.cropper-line.line-s { bottom: -12px !important; height: 24px !important; }
.cropper-point { width: 32px !important; height: 32px !important; opacity: 1 !important; background: transparent !important; border-radius: 50%; }
.cropper-point::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); box-shadow: 0 1px 5px rgba(0,0,0,.4); pointer-events: none;
}
.cropper-point.point-se::before { display: none !important; }
.cropper-point.point-n { top: -16px !important; left: 50% !important; margin-left: -16px !important; }
.cropper-point.point-s { bottom: -16px !important; left: 50% !important; margin-left: -16px !important; }
.cropper-point.point-e { right: -16px !important; top: 50% !important; margin-top: -16px !important; }
.cropper-point.point-w { left: -16px !important; top: 50% !important; margin-top: -16px !important; }
.cropper-point.point-nw { top: -16px !important; left: -16px !important; }
.cropper-point.point-ne { top: -16px !important; right: -16px !important; }
.cropper-point.point-sw { bottom: -16px !important; left: -16px !important; }
.cropper-point.point-se { bottom: -16px !important; right: -16px !important; }
.cropper-crop-box { touch-action: none; }

/* QR */
.field-group { display: none; }
.field-group.active { display: block; animation: slideDown .3s var(--ease-out); }
.type-tabs { flex-wrap: wrap; }
.type-tab { flex: 1 1 auto; }

/* ---------- Features & info sections (tool pages) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 0 0 3rem; }
.feature-card {
  position: relative; padding: 1.6rem 1.5rem 1.5rem; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease), border-color .3s;
  overflow: hidden;
}
.feature-card::before {
  content: ""; display: block; width: 44px; height: 44px; border-radius: 13px; margin-bottom: 1rem;
  background: var(--grad) center / 22px no-repeat;
  box-shadow: var(--shadow-brand);
}
.feature-card:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z'/%3E%3C/svg%3E"), var(--grad); background-size: 22px, cover; background-repeat: no-repeat; background-position: center; }
.feature-card:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E"), var(--grad); background-size: 22px, cover; background-repeat: no-repeat; background-position: center; }
.feature-card:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"), var(--grad); background-size: 22px, cover; background-repeat: no-repeat; background-position: center; }
.feature-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(228,145,201,.25), transparent 70%); transition: transform .5s var(--ease-out); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e2d6ea; }
.feature-card:hover::after { transform: scale(1.4); }
.feature-title { font-size: 1.08rem; font-weight: 750; color: var(--ink); margin-bottom: .35rem; letter-spacing: -.015em; }
.feature-text { font-size: .92rem; color: var(--muted); }

.info-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3.5vw, 2.6rem); margin-bottom: 1.5rem; box-shadow: var(--shadow-xs);
}
.info-section h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin-bottom: .8rem; font-weight: 780; text-wrap: balance; }
.info-section h2::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--grad); margin-top: .7rem; }
.info-section > p { margin-bottom: 1rem; max-width: 78ch; }
.info-section > p:last-child { margin-bottom: 0; }
.info-section a:not(.btn) { font-weight: 650; text-decoration: underline; text-decoration-color: rgba(152,37,152,.3); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.info-section a:not(.btn):hover { text-decoration-color: currentColor; }
.tool-about h3 { font-size: 1.12rem; font-weight: 720; margin: 1.6rem 0 .5rem; text-wrap: balance; word-break: auto-phrase; }
.tool-about p { margin-bottom: .9rem; max-width: 78ch; }
.tool-about-list { list-style: none; padding: 0; display: grid; gap: .45rem; margin: .4rem 0 1rem; max-width: 78ch; }
.tool-about-list li { position: relative; padding-left: 1.5rem; }
.tool-about-list li::before { content: ""; position: absolute; left: .25rem; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }

.steps-list { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.steps-list li { counter-increment: step; position: relative; padding: 1.2rem 1.2rem 1.2rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .92rem; }
.steps-list li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; margin-bottom: .75rem;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem;
}
.steps-list li strong { display: block; color: var(--ink); margin-bottom: .2rem; font-size: .98rem; }

.usecases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; margin-top: 1.3rem; }
.usecase-card { position: relative; padding: 1.15rem 1.2rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); transition: transform .3s var(--ease-out), border-color .3s, background-color .3s, box-shadow .3s; }
.usecase-card:hover { transform: translateY(-3px); background: var(--surface); border-color: #e2d6ea; box-shadow: var(--shadow); }
.usecase-card h3 { font-size: 1rem; margin-bottom: .3rem; font-weight: 720; }
.usecase-card h3 a { color: var(--ink); text-decoration: none !important; }
.usecase-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.usecase-card:hover h3 a { color: var(--brand); }
.usecase-card p { font-size: .88rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 1.2rem 0 .6rem; border: 1px solid var(--line); border-radius: 16px; -webkit-overflow-scrolling: touch; }
.guide-table, .prose table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.guide-table th, .guide-table td, .prose table th, .prose table td { padding: .75rem 1rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.guide-table thead th, .prose table thead th { background: var(--surface-2); color: var(--ink); font-weight: 750; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.guide-table tbody tr:last-child td { border-bottom: 0; }
.guide-table tbody tr { transition: background-color .2s; }
.guide-table tbody tr:hover { background: var(--brand-50); }
.guide-table td:first-child { font-weight: 650; color: var(--ink-2); }
.table-note { font-size: .82rem; color: var(--muted); }

/* Accordions (homepage/tool FAQ + FAQ page) */
.home-faq-item, .faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: .6rem; overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.home-faq-item:hover, .faq-item:hover { border-color: #ddd2e8; }
.home-faq-item:has(.active), .faq-item:has(.active) { border-color: rgba(152,37,152,.35); box-shadow: 0 10px 26px -18px rgba(152,37,152,.5); }
.home-faq-question, .faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem; cursor: pointer; font-weight: 680; color: var(--ink); font-size: .98rem; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; user-select: none; transition: background-color .2s;
}
.home-faq-question:hover, .faq-question:hover { background: var(--surface-2); }
.home-faq-question > span:last-child, .faq-question > span:last-child {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--brand); font-size: 1.1rem; font-weight: 600; line-height: 1;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s;
}
.home-faq-question:has(+ .active) > span:last-child, .faq-question:has(+ .active) > span:last-child { background: var(--brand); color: #fff; transform: rotate(180deg); }
.home-faq-answer, .faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.home-faq-answer > *, .faq-answer > * { overflow: hidden; min-height: 0; }
.home-faq-answer.active, .faq-answer.active { grid-template-rows: 1fr; }
.home-faq-answer p, .faq-answer p, .faq-text { padding: 0 1.15rem 1.1rem; color: var(--text); font-size: .94rem; }
.home-faq-answer > p:first-child, .faq-answer > p:first-child { padding-top: .1rem; }

/* ---------- Content pages ---------- */
.page-hero { padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--faint); }
.breadcrumb [aria-current] { color: var(--ink-2); }
.page-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 820; letter-spacing: -.035em; text-wrap: balance; margin-bottom: .8rem; }
.lead { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--muted); max-width: 70ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.hero-actions .btn svg { transition: transform .3s var(--ease-out); }
.hero-actions .btn:hover svg { transform: translateX(3px); }

.page-body { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.prose {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 5vw, 3.2rem); box-shadow: var(--shadow-sm);
  font-size: 1.02rem; line-height: 1.75; color: var(--text);
}
.prose > *:first-child { margin-top: 0 !important; }
.prose h2 { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.65rem); margin: 2.4rem 0 .8rem; font-weight: 780; padding-top: .2rem; }
.prose h2::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--grad); margin-bottom: .9rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; font-weight: 720; }
.prose h4 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.prose p { margin-bottom: 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 0; list-style: none; display: grid; gap: .5rem; }
.prose ul > li { position: relative; padding-left: 1.6rem; }
.prose ul > li::before { content: ""; position: absolute; left: .25rem; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; position: relative; padding-left: 2.4rem; min-height: 1.75rem; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: .1rem; width: 1.65rem; height: 1.65rem; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 800; }
.prose a:not(.btn) { font-weight: 650; text-decoration: underline; text-decoration-color: rgba(152,37,152,.3); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:not(.btn):hover { text-decoration-color: currentColor; }
.prose blockquote { margin: 1.4rem 0; padding: 1rem 1.3rem; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); padding: .12em .4em; border-radius: 6px; color: var(--brand-700); }
.prose pre { background: #0f1030; color: #f1ecf7; padding: 1rem 1.2rem; border-radius: 14px; overflow-x: auto; margin: 1.2rem 0; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2rem 0; }
.prose .table-wrap { margin: 1.2rem 0 1rem; }
.prose .table-wrap table { margin: 0; }
.prose .cta-row { margin: 1.4rem 0 1.6rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.prose .callout, .callout {
  position: relative; padding: 1.2rem 1.3rem 1.2rem 3.4rem; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--brand-100); color: var(--ink-2); margin: 1.6rem 0;
}
.callout::before { content: ""; position: absolute; left: 1.15rem; top: 1.25rem; width: 22px; height: 22px; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E") center/contain no-repeat; }
.muted-note { font-size: .88rem; color: var(--muted); margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.related-links { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .6rem !important; }
.related-links > li { padding: 0 !important; }
.related-links > li::before { display: none !important; }
.related-links > li > a {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; height: 100%;
  padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
  text-decoration: none !important; color: var(--ink) !important; font-weight: 650; font-size: .93rem;
  transition: transform .25s var(--ease-out), border-color .25s, background-color .25s, box-shadow .25s;
}
.related-links > li > a::after { content: "→"; color: var(--brand); transition: transform .25s var(--ease-out); }
.related-links > li > a:hover { transform: translateY(-2px); background: var(--surface); border-color: #e2d6ea; box-shadow: var(--shadow); }
.related-links > li > a:hover::after { transform: translateX(3px); }

/* FAQ page */
.faq-section-title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem) !important; margin: 2.6rem 0 .35rem !important; }
.faq-section-title:first-of-type { margin-top: .5rem !important; }
.faq-section-intro { color: var(--muted); margin-bottom: 1.1rem !important; }
.faq-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.faq-nav a { padding: .45rem .9rem; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--line); font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.faq-nav a:hover { border-color: var(--brand); color: var(--brand); }
.faq-nav a { display: inline-flex; align-items: center; gap: .4rem; }
.faq-nav a svg { width: 15px; height: 15px; color: var(--brand); }

/* Troubleshooting */
.issue-box { border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.4rem; margin: 0 0 1rem; background: var(--surface); transition: border-color .25s, box-shadow .25s; }
.issue-box:hover { border-color: #e2d6ea; box-shadow: var(--shadow-sm); }
.issue-box h3 { margin: 0 0 .5rem !important; display: flex; align-items: center; gap: .55rem; font-size: 1.08rem; }
.issue-box h3::before { content: "?"; flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: .85rem; font-weight: 800; }
.issue-box ul { margin-bottom: .9rem; }
.solution { border-radius: 14px; padding: 1rem 1.1rem; background: var(--success-bg); border: 1px solid #c6f0d5; }
.solution h4 { margin: 0 0 .3rem !important; color: var(--success); display: flex; align-items: center; gap: .4rem; font-size: .92rem; letter-spacing: .02em; }
.solution h4::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; }
.solution p { margin: 0; font-size: .94rem; color: #14532d; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1.4rem; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--shadow); }
.contact-card h2 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .86rem; font-weight: 700; color: var(--ink-2); margin-bottom: .4rem; }
.form-group textarea { min-height: 150px; }
form button[type="submit"] { width: 100%; margin-top: .4rem; min-height: 52px; }
.contact-aside .prose { padding: clamp(1.3rem, 3vw, 2rem); }
.contact-aside .prose h2 { font-size: 1.15rem; margin-top: 1.8rem; }
.contact-aside .prose h2:first-child { margin-top: 0; }

/* 404 */
.notfound-code { font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 850; line-height: 1; letter-spacing: -.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .3rem; animation: floaty 6s var(--ease) infinite; display: inline-block; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* Blog (rendered by netlify/functions/blog.js) */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.blog-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-xs); transition: transform .35s var(--ease-out), box-shadow .35s, border-color .3s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #e2d6ea; }
.blog-content { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.4rem; }
.blog-title { font-size: 1.15rem; line-height: 1.35; margin-bottom: .5rem; font-weight: 750; }
.blog-title a { color: var(--ink); }
.blog-title a::after { content: ""; position: absolute; inset: 0; }
.blog-card:hover .blog-title a { color: var(--brand); }
.blog-meta { font-size: .8rem; color: var(--faint); font-weight: 600; margin-bottom: .7rem; }
.blog-excerpt { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; flex: 1; }
.read-more { font-weight: 700; font-size: .9rem; color: var(--brand); display: inline-flex; gap: .3rem; }
.empty-message { text-align: center; padding: 3rem 1.5rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 20px; grid-column: 1 / -1; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.article-meta span + span::before { content: "•"; color: var(--faint); margin-right: .55rem; }
.not-found { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.tools-cta { max-width: 816px; margin-left: auto; margin-right: auto; margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; padding: clamp(1.3rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--ink); color: #d9d6ea; position: relative; overflow: hidden; isolation: isolate; }
.tools-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 120% at 100% 0%, rgba(152,37,152,.55), transparent 60%), radial-gradient(40% 90% at 0% 100%, rgba(228,145,201,.25), transparent 60%); }
.tools-cta > div:first-child { flex: 1 1 260px; min-width: 0; max-width: 460px; }
.tools-cta h2 { color: #fff; font-size: 1.3rem; margin-bottom: .3rem; }
.tools-cta p { font-size: .95rem; }
.tools-cta-links { flex: 0 1 380px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-left: auto; }
.tools-cta-links a { display: flex; align-items: center; gap: .45rem; min-width: 0; line-height: 1.25; padding: .55rem .9rem; border-radius: 11px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; font-weight: 650; font-size: .86rem; transition: background-color .2s, transform .2s; }
.tools-cta-links a:hover { background: rgba(255,255,255,.2); color: #fff; transform: translateY(-1px); }
.tools-cta-links svg { width: 16px; height: 16px; flex: none; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: auto; background: #0e0f2b; color: #b9b8d3; overflow: hidden; isolation: isolate; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(228,145,201,.6), rgba(152,37,152,.8), transparent); }
.site-footer::after { content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -220px; top: -320px; border-radius: 50%; background: radial-gradient(circle, rgba(152,37,152,.28), transparent 65%); pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2.2rem 1.8rem; padding-top: 3.6rem; padding-bottom: 2.6rem; }
.footer-brand .brand-name { background: linear-gradient(135deg, #fff 20%, #E491C9); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.15rem; }
.footer-brand p { margin-top: .9rem; font-size: .9rem; line-height: 1.6; max-width: 32ch; color: #a6a5c4; }
.footer-brand .brand img { width: 40px; height: 40px; border-radius: 11px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.footer-badges span { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: #d7d5ee; background: rgba(255,255,255,.04); }
.footer-col h3 { color: #fff; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: .55rem; }
.footer-col a { color: #b9b8d3; font-size: .9rem; display: inline-block; transition: color .2s, transform .25s var(--ease-out); }
.footer-col a:hover { color: #fff; transform: translateX(2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.5rem; padding-top: 1.3rem; padding-bottom: 1.6rem; font-size: .84rem; color: #8f8eae; }
.footer-langs { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.footer-langs a { color: #8f8eae; font-size: .82rem; }
.footer-langs a:hover, .footer-langs a[aria-current="true"] { color: #fff; }
.footer-privacy { display: inline-flex; align-items: center; gap: .45rem; }
.footer-privacy svg { width: 15px; height: 15px; color: #6ee7a1; }

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.92); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease-out);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--brand); transform: translateY(-2px); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ---------- Phones & small tablets: one-line tool picker + bottom sheet ----------
   The pill bar becomes a slide-up sheet, opened from a single bar that always
   takes one row - however many tools are added later. Below 1150px the
   six tools no longer fit on one line in every language, so the sheet is used. */
@media (max-width: 1150px) {
  .tool-picker {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    width: 100%; max-width: 560px; min-height: 50px; margin: 0 auto .8rem; padding: .45rem .45rem .45rem .9rem;
    border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.88); box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    color: var(--ink); font-weight: 750; font-size: .95rem; cursor: pointer; text-align: left;
    -webkit-tap-highlight-color: transparent; transition: border-color .2s, box-shadow .2s;
  }
  .tool-picker:active { transform: scale(.99); }
  .tool-picker-current { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
  .tool-picker-current span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tool-picker-current svg { width: 20px; height: 20px; flex: none; color: var(--brand); }
  .tool-picker-action {
    display: inline-flex; align-items: center; gap: .3rem; flex: none;
    padding: .45rem .7rem .45rem .85rem; border-radius: 11px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700;
  }
  .tool-picker-action .caret { width: 14px; height: 14px; transition: transform .25s var(--ease); }
  .tool-picker[aria-expanded="true"] .tool-picker-action .caret { transform: rotate(180deg); }

  .tool-sheet-backdrop {
    display: block; position: fixed; inset: 0; z-index: 140; background: rgba(15,16,48,.45);
    opacity: 0; transition: opacity .25s var(--ease);
  }
  .tool-sheet-backdrop.is-open { opacity: 1; }

  .tool-switcher {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; margin: 0; max-width: none; width: auto;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-auto-rows: 1fr; gap: .55rem; /* header row, then equal-height tool rows */
    padding: .5rem 16px calc(18px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto;
    background: var(--surface); border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px -12px rgba(15,16,48,.35);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transform: translateY(105%); visibility: hidden;
    transition: transform .32s var(--ease-out), visibility 0s linear .32s;
  }
  .tool-switcher.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .tool-sheet-head {
    display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; grid-row: auto;
    min-height: 0; padding: .7rem .1rem .3rem; position: relative;
  }
  .tool-sheet-head::before { content: ""; position: absolute; top: .1rem; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .tool-sheet-title { font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .tool-sheet-close { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
  .tool-sheet-close svg { width: 18px; height: 18px; }
  .tool-switcher a {
    flex-direction: column; justify-content: center; gap: .45rem; min-width: 0; min-height: 84px; padding: .8rem .6rem;
    border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
    font-size: .88rem; font-weight: 700; white-space: normal; text-align: center; line-height: 1.25; color: var(--ink);
  }
  .tool-switcher a svg { width: 22px; height: 22px; flex: none; opacity: 1; color: var(--brand); }
  .tool-switcher a[aria-current="page"] svg { color: #fff; }
  body.sheet-open { overflow: hidden; }
  /* the hero is its own stacking context (isolation); lift it above the page
     and header while the sheet is open, so the backdrop and sheet cover all */
  body.sheet-open .tool-hero { z-index: 200; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .tool-content { grid-template-columns: 1fr; }
  .tool-content > .section-left { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .tool-content > .section:not(.section-left) { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.2rem; padding-top: 2.6rem; }
  .nav-dropdown-menu.mega { width: auto; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .btn, .btn-download, button.btn-primary, button.btn-secondary { white-space: normal; max-width: 100%; text-align: center; }
  .tool-hero { padding: 1rem 0 .9rem; }
  .tool-lead { font-size: .9rem; }
  .trust-chips { margin-top: .7rem; gap: .35rem; }
  .trust-chips li { font-size: .74rem; padding: .22rem .55rem .22rem .4rem; }
  .trust-chips li:nth-child(n+4) { display: none; }
  .tool-wrapper { border-radius: 20px; margin-left: -4px; margin-right: -4px; margin-bottom: 2.4rem; }
  .tool-content > .section:not(.section-left) { border-radius: 0 0 20px 20px; }
  .sliders-grid { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .ratio-grid { grid-template-columns: repeat(3, 1fr); }
  .ratio-btn { font-size: .74rem; }
  .tool-row { grid-template-columns: repeat(2, 1fr); }
  .button-group { grid-template-columns: 1fr; }
  .download-row { grid-template-columns: 1fr; }
  .preview-box { min-height: 240px; }
  .info-section { border-radius: 20px; }
  .steps-list { grid-template-columns: 1fr; }
  .prose { border-radius: 20px; }
  .guide-table th, .guide-table td, .prose table th, .prose table td { padding: .6rem .75rem; font-size: .84rem; }
  .bulk-file-row { grid-template-columns: 40px minmax(0,1fr) 30px; }
  .bulk-file-status { grid-column: 2; grid-row: 2; justify-self: start; margin-top: -.3rem; }
  .bulk-file-remove { grid-column: 3; grid-row: 1 / span 2; }
  .bulk-file-thumb { grid-row: 1 / span 2; width: 40px; height: 40px; }
  .footer-bottom .wrap { flex-direction: column; align-items: flex-start; }
  .to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
}
@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
  .ratio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .site-header, .site-footer, .to-top, .tool-switcher, .tool-picker, .tool-sheet-backdrop, .mobile-nav { display: none !important; }
  .prose, .info-section, .tool-wrapper { box-shadow: none; border-color: #ddd; }
  body { background: #fff; }
}

/* ---------- Background remover ---------- */
.bg-original { display: flex; align-items: center; gap: .7rem; padding: .55rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bg-original img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--surface-3); }
.bg-original span { font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.bg-mode-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .35rem 0 1rem; }
.bg-mode-row label { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; }
.bg-mode-row label:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); }
.bg-mode-row input { accent-color: var(--brand); }
input[type="color"] { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.preview-box .bg-result-img { max-height: 560px; }
.tool-note { font-size: .8rem; color: var(--muted); margin-top: .9rem; line-height: 1.5; }

/* ---------- Metadata remover ---------- */
.check-row { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .2rem; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.check-row input { margin-top: .2rem; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.check-row small { display: block; color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.md-row { cursor: pointer; }
.md-row.is-selected { border-color: var(--brand); box-shadow: var(--ring); }
.preview-box.md-report { display: block; background: var(--surface); text-align: left; padding: 1rem 1.1rem; min-height: 320px; overflow: auto; max-height: 720px; }
.md-report .preview-empty { min-height: 280px; justify-content: center; margin: 0 auto; }
.md-file-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.md-file-head img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface-3); }
.md-file-head strong { display: block; font-size: .92rem; color: var(--ink); word-break: break-all; }
.md-file-head span { font-size: .8rem; color: var(--muted); }
.md-title { font-size: .95rem; font-weight: 760; margin: 1rem 0 .5rem; }
.md-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; background: var(--surface); }
.md-group summary { cursor: pointer; padding: .6rem .8rem; font-weight: 680; font-size: .88rem; display: flex; justify-content: space-between; align-items: center; }
.md-count { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.md-rows { padding: 0 .8rem .4rem; }
.md-rows .info-row strong { max-width: 60%; overflow-wrap: anywhere; }
.md-more { font-size: .78rem; color: var(--muted); padding: .3rem 0 .5rem; }
.md-blocks { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: .3rem; font-size: .86rem; }
.md-blocks li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .6rem; border-radius: 9px; background: var(--danger-bg); color: var(--danger); }
.md-verify { margin-top: .8rem; padding: .6rem .8rem; border-radius: 10px; background: var(--success-bg); color: var(--success); font-weight: 650; font-size: .86rem; }
.md-muted { color: var(--muted); font-size: .88rem; }
.md-gps { font-weight: 650; }

/* ---------- Long-form tool articles ---------- */
.tool-article { max-width: 78ch; }
.tool-article p, .tool-article li { line-height: 1.75; }
.tool-article a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

/* Cropper: custom ratio + live selection size */
.custom-ratio { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: -.2rem 0 1rem; font-size: .85rem; color: var(--ink-2); }
.custom-ratio-label { font-weight: 650; margin-right: .2rem; }
.custom-ratio input[type="number"] { width: 5.2rem; min-height: 40px; padding: .4rem .55rem; }
.custom-ratio .icon-btn { padding: .45rem .9rem; }
.crop-live { margin: .55rem 0 0; font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.crop-live strong { color: var(--ink); }

/* ---------- 2026-10-16 fixes ---------- */
/* Radios and checkboxes: no square focus ring (the global input:focus box-shadow) */
input[type="radio"]:focus, input[type="checkbox"]:focus { box-shadow: none; }
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid rgba(152,37,152,.55); outline-offset: 2px; border-radius: 50%; }
input[type="checkbox"]:focus-visible { border-radius: 4px; }

/* Tools menu: every description on one line */
.nav-dropdown-menu.mega { width: auto; min-width: 560px; grid-template-columns: repeat(2, max-content); }
.mega-item small, .mega-item strong { white-space: nowrap; }
@media (max-width: 720px) { .nav-dropdown-menu.mega { min-width: 0; grid-template-columns: 1fr; } .mega-item small { white-space: normal; } }

/* Footer: brand + three columns */
.footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* Long-form tool articles: full section width, same typography as guides */
.tool-article { max-width: none; font-size: 1.02rem; line-height: 1.75; color: var(--text); }
.tool-article > * { max-width: 880px; margin-left: auto; margin-right: auto; }
.tool-article > .table-wrap, .tool-article > .usecases-grid, .tool-article > .feature-grid { max-width: none; }
.tool-article h2 { margin-top: 2.6rem; margin-bottom: .9rem; }
.tool-article h2:first-child { margin-top: 0; }
.tool-article h3 { font-size: 1.15rem; font-weight: 720; margin-top: 1.7rem; margin-bottom: .55rem; color: var(--ink); text-wrap: balance; }
.tool-article p { margin-top: 0; margin-bottom: 1.05rem; }
.tool-article ul, .tool-article ol { margin-top: 0; margin-bottom: 1.25rem; padding-left: 0; list-style: none; display: grid; gap: .55rem; }
.tool-article ul > li { position: relative; padding-left: 1.6rem; }
.tool-article ul > li::before { content: ""; position: absolute; left: .25rem; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.tool-article ol { counter-reset: li; }
.tool-article ol > li { counter-increment: li; position: relative; padding-left: 2.4rem; min-height: 1.75rem; }
.tool-article ol > li::before { content: counter(li); position: absolute; left: 0; top: .15rem; width: 1.65rem; height: 1.65rem; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 800; }
.tool-article li > p { margin-bottom: .4rem; }
.tool-article blockquote { margin-top: 1.4rem; margin-bottom: 1.4rem; padding: 1rem 1.3rem; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.tool-article .table-wrap { margin-top: 1.2rem; margin-bottom: 1.4rem; }
.tool-article strong { color: var(--ink); }

/* Guides index page */
.guides-group { margin-bottom: 2.2rem; }
.guides-group > h2 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); font-weight: 780; margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem; }
.guides-group > h2 .tool-icon { width: 36px; height: 36px; }
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.guide-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.15rem 1.25rem; color: var(--text); box-shadow: var(--shadow-xs); transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s; }
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #e2d6ea; color: var(--text); }
.guide-card h3 { font-size: 1.02rem; font-weight: 740; color: var(--ink); margin: 0 0 .35rem; line-height: 1.35; }
.guide-card p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.55; }
.guide-card .read-more { display: inline-block; margin-top: .6rem; font-size: .85rem; font-weight: 700; color: var(--brand); }
.issue-label { font-weight: 650; color: var(--ink-2); margin: .2rem 0 .3rem !important; font-size: .92rem; }

/* 2026-10-16: text tables wrap inside the column instead of scrolling sideways.
   Short cells (sizes, numbers) still stay on one line because the browser only
   wraps when the table would otherwise be wider than its container. */
/* Guides and tool pages: sizes and numbers stay on one line, only the last
   (descriptive) column wraps. Blog tables are text in every column, so they
   wrap everywhere. */
.guide-table td:last-child, .guide-table th:last-child, .prose table td:last-child, .prose table th:last-child { white-space: normal; min-width: 12rem; }
.page-article .prose table th, .page-article .prose table td { white-space: normal; min-width: 0; }
.page-article .prose table td:first-child { min-width: 7.5rem; }
.guide-table td { line-height: 1.5; vertical-align: top; }
.related-links { list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; }
.related-links > li::marker { content: none; }

/* CJK typography: tracking added for uppercase Latin labels looks broken in
   Japanese and Korean, and Korean should only wrap between words. */
html:lang(ja) body *, html:lang(ko) body * { letter-spacing: 0 !important; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
html:lang(ja) body { line-break: strict; }

/* Figures inside articles, guides and tool write-ups */
.article-figure { margin: 1.6rem auto 1.8rem; }
.article-figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.article-figure img[src$=".svg"] { max-width: 760px; margin: 0 auto; }
.article-figure img[src*="wifi-qr-code"] { max-width: 260px; padding: 12px; }
.article-figure img[src*="passport-photo"] { max-width: 360px; margin: 0 auto; }

/* 2026-10-17: one shared column for everything in a tool article, so headings,
   paragraphs, lists and figures all start at the same left edge. */
.info-section.tool-article > *:not(.table-wrap):not(.usecases-grid):not(.feature-grid):not(.article-figure) { max-width: 880px; margin-left: auto; margin-right: auto; }
.info-section.tool-article > p, .info-section.tool-article > h2, .info-section.tool-article > h3 { width: auto; padding-left: 0; padding-right: 0; }

/* 2026-10-17: tools panel under posts: text on top, tool links below in even
   columns; a label never breaks onto two lines. */
.tools-cta { display: block; }
.tools-cta > div:first-child { max-width: none; margin-bottom: 1.1rem; }
.tools-cta-links { margin-left: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.tools-cta-links a { white-space: nowrap; font-size: .85rem; padding: .6rem .8rem; }
@media (max-width: 880px) { .tools-cta-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .tools-cta-links { grid-template-columns: 1fr; } }

/* 2026-10-17: smaller figures, centred in the text column */
.article-figure { max-width: 620px; }
.info-section.tool-article > .article-figure, .prose > .article-figure, .article-figure { max-width: 620px; }
.article-figure img { width: auto; max-width: 100%; margin-left: auto; margin-right: auto; }
.article-figure img[src$=".svg"] { width: 100%; }
/* long URLs in lists/paragraphs wrap instead of pushing the page sideways on phones */
.tool-article li, .tool-article p, .prose li, .prose p { overflow-wrap: anywhere; }
.article-figure img[src*="passport-photo"] { max-width: min(360px, 100%); }

/* cropper: circle preset shows the selection as a circle */
.crop-circle .cropper-view-box, .crop-circle .cropper-face { border-radius: 50%; }
.crop-circle .cropper-view-box { outline: 0; box-shadow: 0 0 0 1px #39f; }
.custom-size input { width: 5.2rem; }

/* Auto ads: anchor ads pin to the top or bottom edge of the screen. nav.js measures them and
   sets --ad-top / --ad-bottom so the header, the back-to-top button and the mobile tool
   sheet sit next to the ad instead of underneath it. */
.site-header { top: var(--ad-top, 0px); }
.tool-content > .section-preview { top: calc(var(--header-h) + 16px + var(--ad-top, 0px)); }
.to-top { bottom: calc(18px + var(--ad-bottom, 0px)); }
@media (max-width: 1150px) { .tool-switcher { bottom: var(--ad-bottom, 0px); } }
.article-figure .compare-frame { position: relative; display: block; width: 100%; line-height: 0; }
.article-figure .compare-frame img { display: block; width: 100%; height: auto; }
.compare-tag { position: absolute; top: 10px; padding: 4px 11px; border-radius: 999px; background: rgba(20, 16, 40, .74); color: #fff; font-size: .78rem; font-weight: 600; line-height: 1.4; letter-spacing: .02em; pointer-events: none; }
.compare-before { left: 10px; }
.compare-after { right: 10px; }
@media (max-width: 480px) { .compare-tag { top: 7px; padding: 3px 8px; font-size: .7rem; } .compare-before { left: 7px; } .compare-after { right: 7px; } }
.author-box { margin: 2rem 0 0; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: 14px; background: var(--brand-50); }
.author-box p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.author-box .author-label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.author-box .author-name { font-weight: 700; margin-bottom: .35rem; }
.author-box .author-name span { font-weight: 500; color: var(--muted); font-size: .9rem; margin-left: .35rem; }
.footer-social { display: flex; gap: .55rem; margin-top: 1.1rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #d7d5ee; transition: color .2s, border-color .2s, background .2s; }
.footer-social a:hover, .footer-social a:focus-visible { color: #fff; border-color: rgba(228,145,201,.6); background: rgba(152,37,152,.25); }
.footer-social svg { width: 18px; height: 18px; }
.author-box { margin-bottom: 1.8rem; }
.related-links.notfound-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.related-links.notfound-tools > li > a { white-space: nowrap; }
@media (max-width: 560px) { .related-links.notfound-tools { grid-template-columns: 1fr; } }
