/* =========================================================================
   LogoRemover-inspired AI image tool template
   -------------------------------------------------------------------------
   Structure:
     01. Tokens / reset
     02. Global UI primitives
     03. Promo bar + header
     04. Hero + upload workspace
     05. Editor / manual mask / processing
     06. Result + comparison
     07. Promo strips + recent history
     08. Marketing sections
     09. FAQ + CTA + footer
     10. Dialog / toast / drag overlay
     11. Responsive
   ========================================================================= */

/* 01. Tokens / reset ------------------------------------------------------ */
:root {
  color-scheme: dark;
  --canvas: #0f1314;
  --canvas-deep: #0b0f10;
  --surface-raised: #1a1d1e;
  --surface-tinted: #131f22;
  --surface-brand: #16313c;
  --surface-elevated: #1f2425;
  --surface-control: #262a2b;
  --surface-interactive: #222f32;
  --border: #3b4345;
  --border-soft: #2b3233;
  --border-faint: rgba(240, 251, 255, 0.07);
  --content-primary: #f0fbff;
  --content-muted: #a7b4b7;
  --content-dim: #819196;
  --brand: #5dd8fe;
  --brand-strong: #28c8f5;
  --brand-soft: #d1f4ff;
  --brand-blue: #1fa2ff;
  --accent-yellow: #f2c94c;
  --accent-yellow-hover: #ffdb68;
  --success: #2dbe6e;
  --danger: #fa2e53;
  --pink: #ff3d7f;
  --purple: #4f2bff;
  --promo-green: #b8f22b;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 10px 35px rgba(0, 0, 0, 0.28);
  --container: 1280px;
  --hero-width: 1244px;
  --header-height: 60px;
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--canvas);
  background-image:
    radial-gradient(950px 380px at 50% -90px, rgba(31, 162, 255, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(93, 216, 254, 0.035) 0, transparent 520px);
  color: var(--content-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: rgba(93, 216, 254, 0.35);
  color: #fff;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

:-webkit-autofill,
:-webkit-autofill:hover,
:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--content-primary);
  box-shadow: 0 0 0 1000px var(--surface-control) inset;
}

/* 02. Primitives ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(16px, 4.2vw, 32px);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #06191e;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  transform: none;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--brand);
  color: #061b21;
  box-shadow: 0 8px 22px rgba(93, 216, 254, 0.12);
}

.btn-primary:hover {
  background: #83e5ff;
}

.btn-primary:disabled {
  background: var(--border);
  color: #dfe8ea;
  opacity: 0.78;
  box-shadow: none;
}

.btn-yellow {
  background: var(--accent-yellow);
  color: #2b240d;
}

.btn-yellow:hover {
  background: var(--accent-yellow-hover);
}

.btn-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--content-primary);
}

.btn-secondary:hover {
  border-color: #5c6a6d;
  background: rgba(255, 255, 255, 0.04);
}

.btn-light {
  background: #f7fbff;
  color: #111a1c;
}

.btn-light:hover {
  background: #fff;
}

.btn-pink {
  background: #f63b87;
  color: #fff;
}

.btn-pink:hover {
  background: #ff579b;
}

.btn-ghost {
  color: #b9c4c7;
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--content-primary);
}

.btn-text {
  padding-inline: 2px;
  min-height: 28px;
  color: #cdd9dc;
  font-size: 12px;
  font-weight: 600;
}

.btn-text:hover {
  color: var(--brand);
}

.btn-mini {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 4px;
}

.btn-dark {
  border-color: var(--border);
  background: rgba(10, 15, 16, 0.72);
  color: #dce7e9;
  backdrop-filter: blur(8px);
}

.btn-dark:hover {
  border-color: #647477;
  background: rgba(10, 15, 16, 0.9);
}

.btn-gradient {
  min-height: 48px;
  padding-inline: 28px;
  background: linear-gradient(100deg, #e1ffee 0%, #8ceaff 42%, #45c9ff 100%);
  color: #102129;
  border-radius: 7px;
  box-shadow: 0 10px 30px rgba(44, 202, 247, 0.16);
}

.btn-gradient:hover {
  box-shadow: 0 14px 40px rgba(44, 202, 247, 0.26);
  filter: brightness(1.03);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--content-muted);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--content-primary);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--content-muted);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(167, 180, 183, 0.4);
  transition: color 150ms var(--ease);
}

.link-button:hover {
  color: var(--brand);
}

.free-label {
  color: var(--content-dim);
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}

.muted {
  color: var(--content-muted);
}

/* 03. Promo bar + header -------------------------------------------------- */
.promo-bar {
  position: relative;
  z-index: 60;
  background:
    radial-gradient(600px 100px at 18% -40%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(90deg, #4c25fa 0%, #4f2bff 55%, #561ff1 100%);
  color: #fff;
}

.promo-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 5px 46px;
  font-size: 13px;
  text-align: center;
}

.promo-new {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 3px;
  background: #ff3d7f;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.promo-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.promo-brand img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #fff;
}

.promo-headline {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.promo-offer {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--promo-green);
  color: #1a0b2e;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.promo-description {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 13px;
  border-radius: 999px;
  background: #ff3d7f;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}

.promo-cta svg {
  width: 12px;
  height: 12px;
}

.promo-cta:hover {
  background: #ff5a93;
  transform: translateY(-1px);
}

.promo-close {
  position: absolute;
  top: 50%;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.promo-close svg {
  width: 16px;
  height: 16px;
}

.promo-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15, 19, 20, 0.91);
  backdrop-filter: blur(16px) saturate(1.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-height);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--content-primary);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 10px rgba(93, 216, 254, 0.16));
}

.brand-name {
  overflow: hidden;
  max-width: 190px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-item {
  position: relative;
}

.nav-trigger,
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 6px;
  color: #e2ecee;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}

.nav-trigger svg,
.nav-link svg {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: #a9b6b9;
  transition: transform 180ms var(--ease);
}

.nav-trigger:hover,
.nav-link:hover,
.nav-item.is-open .nav-trigger {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.nav-item.is-open .nav-trigger svg {
  transform: rotate(180deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  width: 262px;
  padding: 6px;
  border: 1px solid #3c4547;
  border-radius: 9px;
  background: #1a1d1e;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease), visibility 150ms;
}

.nav-item.is-open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #d6e1e3;
  font-size: 12.5px;
  line-height: 1.3;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.nav-menu a:hover {
  background: var(--surface-interactive);
  color: #fff;
}

.nav-menu a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.header-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 42px;
  padding: 3px;
  border-radius: 5px;
  opacity: 0.95;
  transition: opacity 150ms var(--ease), background-color 150ms var(--ease);
}

.header-tool-icon img {
  width: 64px;
  height: auto;
}

.header-tool-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.merch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 6px;
  background: linear-gradient(110deg, rgba(116, 73, 255, 0.16), rgba(255, 61, 127, 0.1));
  color: #f8f5ff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.13);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}

.merch-pill img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.merch-pill:hover {
  border-color: rgba(196, 181, 253, 0.7);
  background: rgba(116, 73, 255, 0.22);
}

.merch-offer {
  padding: 1px 4px;
  border-radius: 2px;
  background: #b8f22b;
  color: #24133d;
  font-size: 9px;
  font-weight: 800;
}

.header-login {
  min-height: 34px;
  padding-inline: 13px;
  font-size: 13px;
  font-weight: 500;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: 5px;
  color: var(--content-primary);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 45;
  max-height: calc(100dvh - var(--header-height));
  overflow: auto;
  padding: 14px clamp(16px, 4.2vw, 32px) 22px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
  background: #111617;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.36);
}

.mobile-nav-group {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.mobile-nav-group:last-of-type {
  border-bottom: 0;
}

.mobile-nav-title {
  padding: 8px 2px;
  color: var(--content-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: #e0eaec;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.mobile-nav-link svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.mobile-menu-footer {
  display: flex;
  gap: 10px;
  padding-top: 16px;
}

.mobile-menu-footer .btn {
  flex: 1;
}

/* 04. Hero + upload workspace -------------------------------------------- */
.hero {
  position: relative;
  padding: 48px 0 0;
}

.hero-inner {
  max-width: var(--hero-width);
  text-align: center;
}

.hero h1 {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 1050px;
  margin: 16px auto 0;
  color: #d1dadd;
  font-size: 15px;
  line-height: 1.55;
  text-wrap: balance;
}

.tool-workspace {
  margin: 38px auto 0;
  text-align: left;
}

.tool-tabs {
  display: flex;
  height: 46px;
  margin-bottom: 33px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.tool-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6px 14px;
  border-radius: 0;
  color: #b9c4c7;
  font-size: 14px;
  font-weight: 600;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.tool-tab + .tool-tab {
  border-left: 1px solid var(--border);
}

.tool-tab:hover {
  color: #e9f2f4;
  background: rgba(255, 255, 255, 0.025);
}

.tool-tab.is-active {
  background: var(--brand);
  color: #061920;
}

.tool-tab.is-active:hover {
  background: #79e4ff;
  color: #061920;
}

.tool-tab.is-disabled {
  opacity: 0.5;
}

.tool-panel.attention {
  animation: panel-attention 1.4s var(--ease);
}

@keyframes panel-attention {
  0%, 100% { border-color: var(--border); box-shadow: 0 20px 65px rgba(0, 0, 0, 0.13); }
  30% { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(93, 216, 254, 0.12), 0 20px 65px rgba(0, 0, 0, 0.13); }
}

.tool-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.13);
}

.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 7px 14px 7px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.file-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #4b5557;
  border-radius: 4px;
  color: #b6c2c5;
}

.file-chip-icon svg {
  width: 15px;
  height: 15px;
}

.file-name {
  overflow: hidden;
  max-width: min(58vw, 480px);
  color: #d7e1e3;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  flex: 0 0 auto;
  color: var(--content-dim);
  font-size: 10.5px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 524px;
}

.editor-pane {
  display: flex;
  align-items: stretch;
  min-width: 0;
  padding: 14px;
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 494px;
  padding: 26px;
  overflow: hidden;
  border: 1px dashed #596466;
  border-radius: 2px;
  background:
    radial-gradient(380px 240px at 50% 48%, rgba(93, 216, 254, 0.025), transparent 76%),
    transparent;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.dropzone:hover {
  border-color: #728084;
}

.dropzone.is-dragover {
  border-color: var(--brand);
  background-color: rgba(93, 216, 254, 0.055);
}

.dropzone.has-image {
  display: block;
  min-height: 0;
  padding: 0;
  border-style: solid;
  border-color: var(--border);
  border-radius: 2px;
  background: #121718;
  cursor: default;
}

.empty-state {
  width: 100%;
  padding: 30px 16px;
  text-align: center;
  user-select: none;
}

.drop-illustration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid rgba(93, 216, 254, 0.24);
  border-radius: 50%;
  background: rgba(93, 216, 254, 0.055);
  color: var(--brand);
}

.drop-illustration svg {
  width: 22px;
  height: 22px;
}

.drop-title {
  margin: 0 auto;
  color: #f4fbfd;
  font-size: clamp(23px, 2.2vw, 29px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.drop-title em {
  font-style: normal;
}

.upload-button {
  width: min(210px, 100%);
  min-height: 48px;
  margin-top: 25px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
}

.upload-hint {
  margin-top: 20px;
  color: #a6b3b6;
  font-size: 11.5px;
  line-height: 1.45;
}

.sample-button {
  margin-top: 11px;
  font-size: 11.5px;
}

.empty-state > .free-label {
  margin-top: 27px;
}

.preview-state {
  width: 100%;
}

.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  max-height: 540px;
  overflow: hidden;
  background-color: #121718;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.025) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: 540px;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.mask-canvas {
  position: absolute;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.mask-canvas[hidden] {
  display: none !important;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 43px;
  padding: 6px 5px 0;
}

.preview-meta {
  color: var(--content-dim);
  font-size: 10.5px;
  white-space: nowrap;
}

.manual-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 6px;
  padding: 10px 10px 3px;
  border-top: 1px solid var(--border-soft);
}

.brush-tools {
  display: inline-flex;
  gap: 5px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: #b7c3c6;
  font-size: 11px;
  font-weight: 500;
  transition: border-color 140ms var(--ease), color 140ms var(--ease), background-color 140ms var(--ease);
}

.tool-chip svg {
  width: 13px;
  height: 13px;
}

.tool-chip:hover,
.tool-chip.is-active {
  border-color: rgba(93, 216, 254, 0.65);
  background: rgba(93, 216, 254, 0.08);
  color: var(--brand);
}

.brush-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3a7;
  font-size: 10.5px;
  white-space: nowrap;
}

.brush-size input {
  width: 76px;
  height: 3px;
  accent-color: var(--brand);
  cursor: pointer;
}

.processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 15, 0.77);
  backdrop-filter: blur(4px);
  transition: background-color 220ms var(--ease), backdrop-filter 220ms var(--ease);
}

.processing-overlay.is-queued {
  background: rgba(8, 12, 13, 0.48);
  backdrop-filter: blur(10px);
}

.processing-card {
  width: min(330px, 100%);
  padding: 26px 26px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(26, 29, 30, 0.95);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.processing-card.is-queued {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.processing-card.is-queued .spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-width: 2px;
  border-color: rgba(240, 251, 255, 0.14);
  border-top-color: var(--brand);
}

.processing-card.is-queued .processing-title {
  font-size: 15px;
  font-weight: 600;
}

.spinner {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border: 2.5px solid rgba(93, 216, 254, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.processing-title {
  color: #e8f2f4;
  font-size: 13.5px;
  font-weight: 600;
}

.processing-description {
  max-width: 250px;
  margin: 6px auto 0;
  color: #a8b8bc;
  font-size: 12px;
  line-height: 1.5;
}

.progress-track {
  height: 4px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand), var(--brand-soft));
  transition: width 220ms var(--ease);
}

.processing-percent {
  margin-top: 8px;
  color: var(--content-dim);
  font-size: 10.5px;
}

.settings-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--border);
  background: var(--surface-raised);
}

.settings-content {
  flex: 1 1 auto;
  padding: 27px 27px 20px;
}

.segmented {
  display: flex;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #222627;
}

.segmented button {
  flex: 1;
  min-width: 0;
  border-radius: 0;
  color: #bac5c8;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}

.segmented button + button {
  border-left: 1px solid var(--border);
}

.segmented button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
}

.segmented button.is-active {
  background: var(--brand);
  color: #061b21;
}

.segmented button.is-active:hover {
  background: #77e3ff;
  color: #061b21;
}

.field-label {
  margin: 22px 0 11px;
  color: #adb9bc;
  font-size: 11px;
  font-weight: 500;
}

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

.target-grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: 168px;
}

.target-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 270px;
}

.target-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 99px;
  padding: 18px 8px 14px;
  border: 1px solid #414a4c;
  border-radius: 5px;
  background: transparent;
  color: #b4c0c3;
  font-size: 11.5px;
  font-weight: 500;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.target-card:hover {
  border-color: #637174;
  background: rgba(255, 255, 255, 0.025);
  color: #e6f0f2;
}

.target-card .target-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.target-card .target-icon svg {
  width: 22px;
  height: 22px;
}

.target-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid #6c797c;
  border-radius: 50%;
  color: transparent;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), color 150ms var(--ease);
}

.target-check svg {
  width: 9px;
  height: 9px;
  stroke-width: 3;
}

.target-card.is-selected {
  border-color: var(--brand);
  background: linear-gradient(145deg, rgba(93, 216, 254, 0.095), rgba(93, 216, 254, 0.025));
  color: #e9f8fc;
  box-shadow: inset 0 0 0 1px rgba(93, 216, 254, 0.1), 0 0 22px rgba(93, 216, 254, 0.045);
}

.target-card.is-selected .target-check {
  border-color: var(--brand);
  background: var(--brand);
  color: #061b21;
}

.mode-hint {
  margin-top: 17px;
  padding: 10px 12px;
  border-left: 2px solid var(--brand);
  border-radius: 0 4px 4px 0;
  background: rgba(93, 216, 254, 0.06);
  color: #b6c8cc;
  font-size: 11.5px;
  line-height: 1.55;
}

.inline-error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(250, 46, 83, 0.38);
  border-radius: 4px;
  background: rgba(250, 46, 83, 0.08);
  color: #ffb5c2;
  font-size: 11.5px;
  line-height: 1.5;
}

.settings-footer {
  flex: 0 0 auto;
  padding: 17px 25px 15px;
  border-top: 1px solid var(--border);
}

.settings-footer .btn-primary {
  min-height: 46px;
  background: var(--accent-yellow);
  color: #28210c;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: none;
}

.settings-footer .btn-primary:hover {
  background: var(--accent-yellow-hover);
}

.settings-footer .btn-primary:disabled {
  background: #4c595d;
  color: #e2eaec;
  opacity: 0.72;
}

.settings-footer .free-label {
  margin-top: 10px;
}

.header-login.is-authed {
  color: var(--brand);
  font-weight: 600;
}

.header-login.is-authed::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(45, 190, 110, 0.45);
  vertical-align: 1px;
}

.tool-panel.is-processing .target-card,
.tool-panel.is-processing .segmented button,
.tool-panel.is-processing .tool-tab {
  pointer-events: none;
}

/* 06. Result + comparison ------------------------------------------------- */
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 540px;
}

.result-preview {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 14px;
}

.compare {
  position: relative;
  width: 100%;
  height: 510px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
  background-color: #121718;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.028) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.028) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.028) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.028) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  user-select: none;
}

.compare-before,
.compare-after-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.compare-after-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--compare-pos, 50%));
}

.compare-label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  background: rgba(10, 14, 15, 0.68);
  color: #f0f7f8;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  backdrop-filter: blur(7px);
}

.compare-label.before { left: 12px; }
.compare-label.after { right: 12px; }

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-pos, 50%);
  z-index: 4;
  width: 1px;
  transform: translateX(-0.5px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(18, 23, 24, 0.72);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
}

.compare-handle svg {
  width: 16px;
  height: 16px;
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
  opacity: 0;
}

.compare-range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

.compare-range::-webkit-slider-thumb {
  width: 40px;
  height: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.compare-range::-moz-range-track {
  height: 100%;
  background: transparent;
}

.compare-range::-moz-range-thumb {
  width: 40px;
  height: 100%;
  border: 0;
  background: transparent;
}

.compare:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.result-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 34px 32px 28px;
  border-left: 1px solid var(--border);
}

.result-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 9px;
  border: 1px solid rgba(45, 190, 110, 0.32);
  border-radius: 999px;
  background: rgba(45, 190, 110, 0.08);
  color: #78e5aa;
  font-size: 10.5px;
  font-weight: 600;
}

.result-success svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.result-panel h2 {
  margin-top: 20px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.result-panel h2:focus {
  outline: none;
}

.result-panel > p {
  margin-top: 12px;
  color: var(--content-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.demo-notice {
  padding: 10px 12px;
  border: 1px solid rgba(242, 201, 76, 0.26);
  border-radius: 4px;
  background: rgba(242, 201, 76, 0.065);
  color: #d9c679 !important;
  font-size: 11px !important;
}

.demo-notice code {
  color: #f3dc8d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 22px;
  padding: 4px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.result-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}

.result-meta dt {
  color: var(--content-dim);
  font-size: 10.5px;
}

.result-meta dd {
  overflow: hidden;
  max-width: 68%;
  color: #d4dee0;
  font-size: 10.5px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 26px;
}

.result-actions .btn-primary {
  min-height: 45px;
  background: var(--brand);
  color: #061b21;
}

.result-actions .btn-primary:hover {
  background: #7ce5ff;
}

.result-actions .btn-secondary {
  min-height: 41px;
  font-size: 12.5px;
}

.result-actions .link-button {
  margin-top: 3px;
  font-size: 11px;
}

/* 07. Promo strips + recent history ------------------------------------- */
.promo-strip {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 68px;
  margin-top: 17px;
  padding: 10px 16px;
  overflow: hidden;
  border: 1px solid #3a3f41;
  border-radius: var(--radius);
  background:
    radial-gradient(500px 100px at 18% 50%, rgba(99, 66, 255, 0.17), transparent 65%),
    linear-gradient(90deg, #1e2021 0%, #211e35 58%, #201c32 100%);
}

.promo-strip-brand {
  position: relative;
  flex: 0 0 104px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
}

.promo-strip-brand img {
  width: 100px;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.promo-strip-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.promo-strip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eef3f5;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.promo-strip-title strong {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-badge {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 2px;
  background: #ff3d7f;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.promo-strip-copy p {
  overflow: hidden;
  margin-top: 1px;
  color: #c2aaff;
  font-size: 10.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-strip-copy .dot {
  color: #867b9f;
}

.promo-strip-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.promo-strip-tags span {
  padding: 3px 8px;
  border: 1px solid #4a4b52;
  border-radius: 999px;
  color: #d0d5d7;
  font-size: 9px;
  line-height: 1.35;
  white-space: nowrap;
}

.promo-strip .btn-light {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.promo-strip .btn-light svg {
  width: 12px;
  height: 12px;
}

.app-promo {
  display: none;
}

.recent-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 47px;
  padding: 10px 17px;
}

.recent-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-icon {
  display: none;
  color: var(--content-muted);
}

.recent-icon svg {
  width: 14px;
  height: 14px;
}

.recent-title-wrap h2 {
  color: #dbe5e7;
  font-size: 12.5px;
  font-weight: 600;
}

.recent-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--content-muted);
  font-size: 9px;
  font-weight: 600;
}

.recent-list {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 43px;
  padding: 0 17px 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.recent-empty {
  color: #6f7e82;
  font-size: 11px;
  line-height: 1.4;
}

.recent-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 188px;
  padding: 7px;
  border: 1px solid #353d3e;
  border-radius: 5px;
  background: #202425;
  text-align: left;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}

.recent-item:hover {
  border-color: #5a686b;
  background: #242a2b;
}

.recent-thumb {
  width: 48px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 3px;
  background: #111718;
}

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

.recent-info {
  min-width: 0;
}

.recent-name {
  display: block;
  overflow: hidden;
  color: #dce6e8;
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-date {
  display: block;
  margin-top: 3px;
  color: var(--content-dim);
  font-size: 9.5px;
}

/* 08. Marketing sections ------------------------------------------------- */
.section {
  padding: 88px 0;
}

.section-band {
  background: var(--surface-tinted);
  border-top: 1px solid rgba(240, 251, 255, 0.045);
  border-bottom: 1px solid rgba(240, 251, 255, 0.045);
}

.section-heading {
  margin-bottom: 43px;
  text-align: center;
}

.eyebrow-line {
  display: block;
  width: 36px;
  height: 3px;
  margin: 0 auto 18px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(93, 216, 254, 0.35);
}

.section-heading h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.step-card {
  min-height: 172px;
  padding: 25px 28px;
  border: 1px solid #314144;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(93, 216, 254, 0.045), transparent 48%),
    rgba(26, 29, 30, 0.74);
  text-align: center;
}

.step-card h3 {
  color: #f4fbfd;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.step-card p {
  margin-top: 12px;
  color: #bac5c8;
  font-size: 12.5px;
  line-height: 1.55;
}

.features-section {
  padding: 95px 0 45px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 82px;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 8vw, 105px);
}

.feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
}

.feature-media img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.feature-copy {
  min-width: 0;
}

.feature-copy .eyebrow-line {
  width: 22px;
  height: 2px;
  margin: 0 0 17px;
  box-shadow: none;
}

.feature-copy h3 {
  max-width: 520px;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.feature-copy p {
  max-width: 540px;
  margin-top: 12px;
  color: #bac5c8;
  font-size: 12.5px;
  line-height: 1.6;
}

.feature-copy .btn {
  min-height: 34px;
  margin-top: 22px;
  padding: 6px 17px;
  background: var(--brand);
  color: #061b21;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px;
  box-shadow: none;
}

.feature-copy .btn:hover {
  background: #85e5ff;
}

.feature-row.is-reverse .feature-media {
  order: 2;
}

.feature-row.is-reverse .feature-copy {
  order: 1;
}

/* 09. FAQ + CTA + footer ------------------------------------------------ */
.faq-section {
  padding: 88px 0 52px;
}

.faq-container {
  max-width: 1220px;
}

.faq-section .section-heading {
  margin-bottom: 35px;
}

.faq-list {
  overflow: hidden;
  border: 1px solid #2b3435;
  border-radius: 5px;
}

.faq-item {
  background: var(--surface-raised);
  transition: background-color 160ms var(--ease);
}

.faq-item + .faq-item {
  border-top: 1px solid #303839;
}

.faq-item:hover {
  background: #1d2223;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  color: #eef6f8;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.faq-question svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #89999d;
  transition: transform 200ms var(--ease), color 200ms var(--ease);
}

.faq-item.is-open .faq-question svg {
  color: var(--brand);
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 230ms var(--ease);
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer-inner > div {
  padding: 0 48px 18px 16px;
  color: #a9b8bc;
  font-size: 12.5px;
  line-height: 1.65;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-static .faq-answer {
  grid-template-rows: 1fr;
}

.faq-static summary {
  cursor: pointer;
  list-style: none;
}

.faq-static summary::-webkit-details-marker {
  display: none;
}

.cta-section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background:
    radial-gradient(900px 300px at 50% -20%, rgba(93, 216, 254, 0.08), transparent 68%),
    var(--surface-brand);
  padding: 68px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cta-section p {
  max-width: 620px;
  margin: 17px auto 0;
  color: #d0dee1;
  font-size: 13px;
  line-height: 1.55;
}

.cta-section .btn {
  margin-top: 25px;
}

.site-footer {
  background: #0d1213;
  padding: 54px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(50px, 8vw, 115px);
  align-items: start;
}

.footer-brand .brand {
  gap: 10px;
}

.footer-brand .brand-mark {
  width: 46px;
  height: 46px;
}

.footer-brand .brand-name {
  font-size: 20px;
}

.footer-tagline {
  margin-top: 15px;
  color: #8d9ca0;
  font-size: 11.5px;
  line-height: 1.5;
}

.language-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 166px;
  height: 32px;
  margin-top: 18px;
  border: 1px solid #3b4446;
  border-radius: 4px;
  background: #13191a;
  color: #bfcbce;
}

.language-select-wrap > span {
  position: absolute;
  left: 9px;
  display: flex;
  pointer-events: none;
}

.language-select-wrap > span svg {
  width: 13px;
  height: 13px;
}

.language-select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 25px 0 29px;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #c0cbce;
  font-size: 10.5px;
  cursor: pointer;
}

.language-select-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1px solid #a7b5b8;
  border-bottom: 1px solid #a7b5b8;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: #93a2a6;
  font-size: 10.5px;
  transition: color 150ms var(--ease);
}

.footer-email svg {
  width: 13px;
  height: 13px;
}

.footer-email:hover {
  color: var(--brand);
}

.footer-columns {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(130px, 0.9fr) minmax(90px, 0.55fr);
  gap: clamp(28px, 5vw, 60px);
}

.footer-column h3 {
  margin-bottom: 13px;
  color: #d9e4e6;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  color: #93a2a6;
  font-size: 10.5px;
  line-height: 1.4;
  transition: color 150ms var(--ease);
}

.footer-column a:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 46px;
  padding: 18px 0 20px;
  border-top: 1px solid #242b2c;
  text-align: center;
}

.footer-bottom p {
  color: #7f8f93;
  font-size: 10.5px;
}

/* 10. Dialog / toast / drag overlay ------------------------------------- */
.site-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid #3c494c;
  border-radius: 12px;
  background: var(--surface-elevated);
  color: var(--content-primary);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.site-dialog::backdrop {
  background: rgba(3, 6, 7, 0.77);
  backdrop-filter: blur(4px);
}

.site-dialog:focus {
  outline: none;
}

.site-dialog[open] {
  animation: dialog-in 180ms var(--ease);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.dialog-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dialog-body {
  padding: 20px;
  color: #aab8bb;
  font-size: 13px;
  line-height: 1.65;
}

.dialog-body p + p {
  margin-top: 12px;
}

.dialog-lead {
  margin-bottom: 13px;
  color: #eff8fa;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
}

.dialog-body code {
  padding: 1px 5px;
  border-radius: 3px;
  background: #121819;
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 21px;
}

.dialog-note {
  color: #89999d;
  font-size: 11.5px;
}

.pricing-callout {
  padding: 17px;
  border: 1px solid rgba(93, 216, 254, 0.28);
  border-radius: 7px;
  background: rgba(93, 216, 254, 0.055);
}

.pricing-callout strong {
  display: block;
  color: #eaf8fb;
  font-size: 16px;
}

.pricing-callout p {
  margin-top: 5px;
  color: #a7b8bc;
  font-size: 12px;
}

.history-dialog-list {
  display: grid;
  gap: 9px;
}

.history-dialog-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: #191e1f;
}

.history-dialog-item img {
  width: 54px;
  height: 46px;
  border-radius: 3px;
  object-fit: cover;
}

.history-dialog-item div {
  min-width: 0;
}

.history-dialog-item strong {
  display: block;
  overflow: hidden;
  color: #dbe7e9;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-dialog-item span {
  display: block;
  margin-top: 2px;
  color: #849498;
  font-size: 10px;
}

.history-dialog-actions {
  margin-top: 16px;
}

/* Account / free-trial / credits dialogs */
.auth-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.auth-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 7px;
  filter: drop-shadow(0 4px 16px rgba(93, 216, 254, 0.18));
}

.auth-tagline {
  max-width: 380px;
  color: #a9b7bb;
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-notice {
  width: 100%;
  margin-top: 17px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 201, 76, 0.28);
  border-radius: 6px;
  background: rgba(242, 201, 76, 0.06);
  color: #d8c275;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
}

.auth-notice strong {
  display: block;
  color: #f2dea0;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-notice p {
  margin-top: 3px;
}

.google-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 21px;
  padding: 10px 18px;
  border: 1px solid #4b5557;
  border-radius: 999px;
  background: #292e2f;
  color: #eef7f9;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), opacity 150ms var(--ease);
}

.google-signin:hover {
  border-color: #6d7a7d;
  background: #303637;
}

.google-signin:disabled {
  opacity: 0.75;
}

.google-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.auth-fineprint {
  max-width: 350px;
  margin-top: 9px;
  color: #819195;
  font-size: 10px;
  line-height: 1.55;
}

.auth-fineprint + .auth-fineprint {
  margin-top: 4px;
}

.auth-later {
  margin-top: 15px;
}

.btn-inline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.credits-panel {
  color: #b4c1c4;
}

.credits-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(93, 216, 254, 0.22);
  border-radius: 6px;
  background: rgba(93, 216, 254, 0.055);
}

.credits-balance > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.credits-balance span {
  color: #91a4a8;
  font-size: 10px;
}

.credits-balance strong {
  color: #f0fbff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.credits-balance .credits-cost {
  color: #9ecad5;
  font-size: 10.5px;
  white-space: nowrap;
}

.credits-description {
  margin-top: 12px;
  color: #9eafb3;
  font-size: 12px;
  line-height: 1.6;
}

.credit-packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.credit-pack {
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border: 1px solid #3b4748;
  border-radius: 7px;
  background: #1a1f20;
  color: #dce7e9;
  text-align: left;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), transform 150ms var(--ease);
}

.credit-pack:hover {
  border-color: var(--brand);
  background: #202728;
  transform: translateY(-1px);
}

.credit-pack:disabled {
  opacity: 0.7;
  transform: none;
}

.credit-pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.credit-pack-name {
  color: #dce8ea;
  font-size: 11px;
  font-weight: 600;
}

.pack-badge {
  padding: 2px 5px;
  border-radius: 2px;
  background: rgba(93, 216, 254, 0.14);
  color: var(--brand);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.credit-amount {
  margin-top: 9px;
  color: #f0fbff;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.credit-amount small {
  margin-left: 4px;
  color: #9aabad;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.credit-price {
  margin-top: 7px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.credit-equivalent {
  margin-top: 2px;
  color: #7f9195;
  font-size: 9.5px;
  line-height: 1.4;
}

.credit-cta {
  align-self: stretch;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #30393a;
  color: #b5c4c7;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.credit-pack:hover .credit-cta {
  color: var(--brand);
}

.checkout-note {
  margin-top: 13px;
  color: #788a8e;
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.purchase-success {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.purchase-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  border: 1px solid rgba(45, 190, 110, 0.32);
  border-radius: 50%;
  background: rgba(45, 190, 110, 0.08);
  color: #78e5aa;
}

.purchase-success-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.5;
}

.purchase-success > strong {
  color: #eff9fb;
  font-size: 16px;
  font-weight: 600;
}

.purchase-success > p {
  max-width: 340px;
  margin-top: 9px;
  color: #9eafb3;
  font-size: 12px;
  line-height: 1.6;
}

.purchase-success > .btn {
  margin-top: 20px;
}

.account-panel {
  color: #b4c1c4;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(93, 216, 254, 0.32);
  border-radius: 50%;
  background: rgba(93, 216, 254, 0.09);
  color: var(--brand);
  font-size: 17px;
  font-weight: 700;
}

.account-identity > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.account-signed-label {
  color: #809195;
  font-size: 10px;
}

.account-identity strong {
  overflow: hidden;
  color: #e8f3f5;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 19px;
}

.account-stats > div {
  padding: 12px;
  border: 1px solid #364142;
  border-radius: 5px;
  background: #191e1f;
}

.account-stats strong {
  display: block;
  color: #eff9fb;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
}

.account-stats span {
  display: block;
  margin-top: 3px;
  color: #87989c;
  font-size: 9.5px;
}

.account-copy {
  margin-top: 13px;
  color: #8c9da1;
  font-size: 10.5px;
  line-height: 1.55;
}

.account-actions {
  margin-top: 20px;
}

.account-actions .btn {
  min-height: 40px;
}

@media (max-width: 560px) {
  .credit-packs {
    grid-template-columns: 1fr;
  }

  .credit-pack {
    min-height: 0;
  }

  .credit-cta {
    margin-top: 9px;
  }
}

.toast-region {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #445154;
  border-left: 2px solid var(--brand);
  border-radius: 5px;
  background: rgba(26, 31, 32, 0.97);
  color: #dce7e9;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
  transform: translateY(6px);
  opacity: 0;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.toast svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--brand);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.is-error {
  border-left-color: var(--danger);
}

.toast.is-error svg {
  color: #ff8da3;
}

.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 9, 0.82);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.drag-overlay.is-visible {
  display: flex;
}

.drag-overlay-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  width: min(440px, 100%);
  padding: 42px 24px;
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
  background: rgba(19, 31, 34, 0.87);
  color: #e5f2f5;
  text-align: center;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.drag-overlay-card > span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 3px;
  border-radius: 50%;
  background: rgba(93, 216, 254, 0.1);
  color: var(--brand);
}

.drag-overlay-card > span:first-child svg {
  width: 24px;
  height: 24px;
}

.drag-overlay-card strong {
  font-size: 16px;
}

.drag-overlay-card > span:last-child {
  color: #9fb0b4;
  font-size: 12px;
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-elevated);
  color: var(--content-primary);
  font-size: 12px;
}

/* 11. Responsive --------------------------------------------------------- */
@media (max-width: 1200px) {
  .desktop-nav .nav-trigger,
  .desktop-nav .nav-link {
    padding-inline: 10px;
  }

  .header-tool-icon {
    display: none;
  }

  .tool-layout,
  .result-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .feature-row {
    gap: 50px;
  }

  .feature-media {
    padding: 22px;
  }
}

@media (max-width: 1020px) {
  .merch-pill {
    display: none;
  }

  .desktop-nav {
    gap: 0;
  }

  .section {
    padding: 72px 0;
  }

  .features-section {
    padding: 78px 0 38px;
  }

  .features-list {
    gap: 62px;
  }

  .feature-row {
    gap: 35px;
  }

  .feature-copy h3 {
    font-size: 21px;
  }

  .footer-grid {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 45px;
  }

  .footer-columns {
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    gap: 12px;
  }

  .header-actions {
    gap: 2px;
  }

  .header-tool-icon {
    display: inline-flex;
    width: 58px;
    height: 38px;
  }

  .header-tool-icon img {
    width: 54px;
  }

  .hero {
    padding-top: 39px;
  }

  .tool-layout,
  .result-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-pane {
    padding: 13px;
  }

  .dropzone {
    min-height: 400px;
  }

  .settings-pane {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .settings-content {
    padding: 21px;
  }

  .settings-footer {
    padding: 15px 21px 16px;
  }

  .settings-footer .btn-primary {
    max-width: 380px;
    margin: 0 auto;
  }

  .settings-footer .free-label {
    margin-top: 8px;
  }

  .target-grid {
    max-width: 420px;
  }

  .tool-layout {
    min-height: 0;
  }

  .dropzone:not(.has-image) {
    min-height: 390px;
  }

  .result-layout {
    min-height: 0;
  }

  .result-preview {
    padding: 13px;
  }

  .compare {
    height: min(61vw, 520px);
    min-height: 330px;
  }

  .result-panel {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 26px 22px 22px;
  }

  .result-actions {
    margin-top: 7px;
  }

  .result-actions .btn {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .result-actions .link-button {
    align-self: center;
  }

  .promo-strip {
    flex-wrap: wrap;
    gap: 9px 14px;
    padding: 12px 14px;
  }

  .promo-strip-brand {
    flex-basis: 84px;
  }

  .promo-strip-brand img {
    width: 82px;
  }

  .promo-strip-copy {
    flex-basis: calc(100% - 95px);
  }

  .promo-strip-tags {
    display: none;
  }

  .promo-strip .btn-light {
    margin-left: auto;
  }

  .promo-strip-copy p {
    white-space: normal;
  }

  .steps-grid {
    gap: 16px;
  }

  .step-card {
    padding: 21px 18px;
  }

  .step-card h3 {
    font-size: 17px;
  }

  .step-card p {
    font-size: 12px;
  }

  .feature-row {
    gap: 28px;
  }

  .feature-media {
    padding: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-columns {
    grid-template-columns: minmax(160px, 1.3fr) minmax(130px, 1fr) minmax(90px, 0.7fr);
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 56px;
  }

  .promo-inner {
    gap: 8px;
    padding: 5px 38px 5px 12px;
    font-size: 12px;
  }

  .promo-brand {
    display: none;
  }

  .promo-description {
    display: none;
  }

  .promo-headline {
    font-size: 11.5px;
  }

  .promo-offer {
    font-size: 9px;
  }

  .promo-cta {
    min-height: 22px;
    padding: 3px 10px;
    font-size: 9.5px;
  }

  .promo-close {
    right: 8px;
  }

  .brand-name {
    max-width: 108px;
    font-size: 17px;
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .header-login {
    padding-inline: 8px;
    font-size: 12px;
  }

  .header-inner {
    height: 56px;
    gap: 7px;
  }

  .header-actions {
    gap: 0;
  }

  .header-tool-icon {
    width: 48px;
    height: 34px;
  }

  .header-tool-icon img {
    width: 46px;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    max-width: 540px;
    font-size: clamp(25px, 6.6vw, 30px);
    line-height: 1.2;
  }

  .hero-copy {
    margin-top: 13px;
    font-size: 13.5px;
    line-height: 1.55;
  }

  .tool-workspace {
    margin-top: 24px;
  }

  .tool-tabs {
    height: 42px;
    margin-bottom: 14px;
  }

  .tool-tab {
    font-size: 13px;
  }

  .editor-topbar {
    min-height: 43px;
    padding-inline: 10px 7px;
  }

  .file-name {
    max-width: 66vw;
    font-size: 11px;
  }

  .file-size {
    display: none;
  }

  .editor-pane {
    padding: 9px;
  }

  .dropzone {
    min-height: 290px;
    padding: 12px;
  }

  .dropzone:not(.has-image) {
    min-height: 310px;
  }

  .empty-state {
    padding: 15px 8px;
  }

  .drop-illustration {
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
  }

  .drop-illustration svg {
    width: 19px;
    height: 19px;
  }

  .drop-title {
    font-size: 21px;
  }

  .upload-button {
    min-height: 44px;
    margin-top: 19px;
    font-size: 13px;
  }

  .upload-hint {
    margin-top: 15px;
    font-size: 10.5px;
  }

  .sample-button {
    font-size: 10.5px;
  }

  .empty-state > .free-label {
    margin-top: 21px;
  }

  .preview-stage {
    min-height: 240px;
    max-height: 390px;
  }

  .preview-image {
    max-height: 390px;
  }

  .preview-toolbar {
    padding-top: 4px;
  }

  .manual-toolbar {
    gap: 7px 10px;
    padding: 9px 5px 2px;
  }

  .brush-size {
    order: 3;
    width: 100%;
    padding-top: 2px;
  }

  .brush-size input {
    flex: 1;
    width: auto;
  }

  .settings-content {
    padding: 15px;
  }

  .segmented {
    height: 38px;
  }

  .field-label {
    margin-top: 16px;
    font-size: 10.5px;
  }

  .target-card {
    min-height: 84px;
    padding: 13px 6px 10px;
    font-size: 10.5px;
  }

  .target-card .target-icon svg {
    width: 19px;
    height: 19px;
  }

  .target-check {
    top: 6px;
    right: 6px;
    width: 13px;
    height: 13px;
  }

  .settings-footer {
    padding: 13px 15px 14px;
  }

  .settings-footer .btn-primary {
    min-height: 43px;
    font-size: 12.5px;
  }

  .promo-strip {
    display: none;
  }

  .app-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background:
      radial-gradient(300px 100px at 0 0, rgba(119, 58, 255, 0.16), transparent 80%),
      var(--surface-raised);
  }

  .app-promo-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 9px;
  }

  .app-promo-copy {
    min-width: 0;
    flex: 1 1 auto;
  }

  .app-promo-copy strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: #f0f7f8;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
  }

  .app-promo-copy p {
    margin-top: 2px;
    color: #aebbc0;
    font-size: 9.5px;
    line-height: 1.4;
  }

  .app-promo-source {
    display: block;
    margin-top: 4px;
    color: #8fa0a4;
    font-size: 9px;
    line-height: 1.35;
  }

  .tag {
    padding: 1px 5px;
    border-radius: 2px;
    background: #b8f22b;
    color: #1a0b2e;
    font-size: 8px;
    font-weight: 800;
  }

  .app-promo .btn-pink {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 10px;
  }

  .recent-card {
    margin-top: 14px;
  }

  .recent-head {
    min-height: 51px;
    padding: 12px 14px;
  }

  .recent-icon {
    display: inline-flex;
  }

  .recent-title-wrap h2 {
    font-size: 12px;
  }

  .recent-list {
    min-height: 39px;
    padding: 0 14px 14px;
  }

  .recent-empty {
    font-size: 10.5px;
  }

  .section {
    padding: 57px 0;
  }

  .section-heading {
    margin-bottom: 27px;
  }

  .eyebrow-line {
    margin-bottom: 15px;
  }

  .section-heading h2 {
    font-size: clamp(23px, 6vw, 28px);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-card {
    min-height: 0;
    padding: 19px 20px;
  }

  .step-card h3 {
    font-size: 16.5px;
  }

  .step-card p {
    margin-top: 8px;
    font-size: 11.5px;
  }

  .features-section {
    padding: 56px 0 28px;
  }

  .features-list {
    gap: 48px;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 23px;
  }

  .feature-row.is-reverse .feature-media,
  .feature-row.is-reverse .feature-copy {
    order: initial;
  }

  .feature-media {
    padding: 13px;
  }

  .feature-copy {
    text-align: center;
  }

  .feature-copy .eyebrow-line {
    margin: 0 auto 13px;
  }

  .feature-copy h3 {
    max-width: none;
    font-size: 20px;
  }

  .feature-copy p {
    max-width: none;
    margin-top: 9px;
    font-size: 11.5px;
  }

  .feature-copy .btn {
    margin-top: 15px;
  }

  .faq-section {
    padding: 57px 0 35px;
  }

  .faq-section .section-heading {
    margin-bottom: 23px;
  }

  .faq-question {
    min-height: 51px;
    padding: 13px 13px;
    font-size: 13px;
  }

  .faq-question svg {
    width: 15px;
    height: 15px;
  }

  .faq-answer-inner > div {
    padding: 0 28px 15px 13px;
    font-size: 11.5px;
  }

  .cta-section {
    padding: 49px 0;
  }

  .cta-section h2 {
    font-size: 26px;
  }

  .cta-section p {
    margin-top: 12px;
    font-size: 12px;
  }

  .cta-section .btn {
    margin-top: 20px;
  }

  .site-footer {
    padding-top: 37px;
  }

  .footer-grid {
    gap: 31px;
  }

  .footer-brand .brand-mark {
    width: 42px;
    height: 42px;
  }

  .footer-brand .brand-name {
    font-size: 19px;
  }

  .footer-tagline {
    margin-top: 12px;
  }

  .language-select-wrap {
    width: 158px;
    margin-top: 15px;
  }

  .footer-columns {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 25px;
  }

  .footer-column:first-child {
    grid-column: 1 / -1;
  }

  .footer-column h3 {
    margin-bottom: 11px;
  }

  .footer-bottom {
    margin-top: 33px;
    padding: 15px 0 17px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: stretch;
    max-width: none;
  }

  .toast {
    font-size: 11.5px;
  }

  .compare {
    height: 310px;
    min-height: 270px;
  }

  .compare-label {
    top: 9px;
    padding: 3px 7px;
    font-size: 9px;
  }

  .compare-label.before { left: 9px; }
  .compare-label.after { right: 9px; }

  .compare-handle {
    width: 30px;
    height: 30px;
  }

  .result-panel h2 {
    font-size: 22px;
  }

  .result-meta > div {
    padding: 6px 0;
  }

  .result-actions {
    padding-top: 20px;
  }
}

@media (max-width: 560px) {
  .promo-new {
    display: none;
  }

  .promo-inner {
    justify-content: center;
    gap: 7px;
    padding-left: 9px;
  }

  .promo-headline {
    overflow: visible;
    max-width: none;
    font-size: 11px;
    text-overflow: clip;
  }

  .promo-offer {
    margin-left: 3px;
    font-size: 8.5px;
  }

  .promo-cta {
    padding: 3px 8px;
    font-size: 9px;
  }

  .promo-cta svg {
    display: none;
  }

  .brand-name {
    max-width: 91px;
    font-size: 16px;
  }

  .header-tool-icon {
    display: inline-flex;
    width: 42px;
    height: 30px;
  }

  .header-tool-icon img {
    width: 40px;
  }

  .header-inner {
    gap: 6px;
  }

  .header-login {
    font-size: 11.5px;
  }

  .footer-brand .brand-name {
    max-width: none;
    font-size: 19px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-copy {
    font-size: 13px;
  }

  .tool-workspace {
    margin-top: 20px;
  }

  .tool-tabs {
    height: 40px;
  }

  .dropzone:not(.has-image) {
    min-height: 284px;
  }

  .drop-title {
    font-size: 20px;
  }

  .upload-hint {
    max-width: 240px;
    margin-inline: auto;
  }

  .preview-stage {
    min-height: 215px;
    max-height: 330px;
  }

  .preview-image {
    max-height: 330px;
  }

  .preview-toolbar {
    gap: 8px;
  }

  .preview-meta {
    overflow: hidden;
    max-width: 54%;
    text-overflow: ellipsis;
  }

  .manual-toolbar {
    padding-bottom: 3px;
  }

  .app-promo {
    align-items: flex-start;
  }

  .app-promo .btn-pink {
    margin-top: 2px;
  }

  .result-preview {
    padding: 9px;
  }

  .compare {
    height: 255px;
    min-height: 240px;
  }

  .result-panel {
    padding: 23px 16px 19px;
  }

  .result-panel h2 {
    font-size: 21px;
  }

  .result-panel > p {
    font-size: 12px;
  }

  .site-dialog {
    width: calc(100vw - 20px);
  }

  .dialog-body {
    padding: 17px;
  }

  .dialog-head {
    padding: 14px 16px;
  }

  .dialog-head h2 {
    font-size: 17px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-column:first-child {
    grid-column: auto;
  }

  .footer-column ul {
    gap: 7px;
  }

  .footer-bottom {
    margin-top: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================================
   GIFREMOVE ADDITIONS
   -------------------------------------------------------------------------
   12. GIF preview stage + player
   13. Background controls (sliders, switches, export options)
   14. Result stage + tips
   15. Use-case section
   16. On-device card overrides
   17. Responsive adjustments for the GIF workspace
   ========================================================================= */

/* 12. GIF preview stage + player ----------------------------------------- */
.result-stage {
  justify-content: center;
}

.compare {
  margin-inline: auto;
  max-width: 100%;
  background-color: #1b2427;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.085) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.085) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.085) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.085) 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

/* The original image is opaque, so it must only cover the left side of the
   slider — otherwise the transparent result reveals the "before" pixels
   instead of the transparency checkerboard. */
.compare-before {
  clip-path: inset(0 calc(100% - var(--compare-pos, 50%)) 0 0);
}

.preview-stage {
  background-color: #161d1f;
  background-image: none;
}

.gif-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 540px;
  margin: 0 auto;
  border-radius: 2px;
  background-color: transparent;
}

.mask-canvas {
  opacity: 0.55;
  mix-blend-mode: normal;
}

.preview-stage {
  padding: 14px;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  border-top: 1px solid var(--border-soft);
  background: #14191a;
}

.player-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(93, 216, 254, 0.34);
  border-radius: 50%;
  background: rgba(93, 216, 254, 0.1);
  color: var(--brand-soft);
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}

.player-toggle:hover {
  border-color: var(--brand);
  background: rgba(93, 216, 254, 0.18);
}

.player-toggle svg {
  width: 13px;
  height: 13px;
}

.player-toggle:disabled {
  opacity: 0.4;
}

.player-track {
  flex: 1 1 auto;
  min-width: 0;
}

.player-range {
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.player-range:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  color: var(--content-dim);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.player-duration {
  color: #738286;
}

.player-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 26px;
  border-radius: 4px;
  color: var(--content-muted);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.player-step:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--content-primary);
}

.player-step svg {
  width: 14px;
  height: 14px;
}

.frame-strip {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border-soft);
  background: #111617;
  scrollbar-width: thin;
  scrollbar-color: #3b4345 transparent;
}

.frame-strip[hidden] {
  display: none !important;
}

.frame-thumb {
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #2f3739;
  border-radius: 3px;
  background:
    linear-gradient(45deg, #1e2425 25%, transparent 25%, transparent 75%, #1e2425 75%),
    linear-gradient(45deg, #1e2425 25%, #161b1c 25%, #161b1c 75%, #1e2425 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}

.frame-thumb canvas {
  display: block;
  max-width: none;
}

.frame-thumb:hover {
  opacity: 1;
  border-color: #4c575a;
}

.frame-thumb.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(93, 216, 254, 0.45);
  opacity: 1;
}

.sample-alternatives {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--content-muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: border-color 140ms var(--ease), color 140ms var(--ease), background-color 140ms var(--ease);
}

.sample-chip svg {
  width: 12px;
  height: 12px;
}

.sample-chip:hover {
  border-color: rgba(93, 216, 254, 0.45);
  background: rgba(93, 216, 254, 0.07);
  color: var(--brand-soft);
}

/* 13. Background controls ------------------------------------------------ */
.slider-stack {
  display: grid;
  gap: 15px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--border-soft);
}

.slider-row {
  display: block;
  margin: 0;
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #c4d0d3;
  font-size: 11.5px;
  font-weight: 600;
}

.slider-head output {
  min-width: 22px;
  color: var(--brand-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.slider-row input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 9px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.slider-note {
  display: block;
  margin-top: 6px;
  color: var(--content-dim);
  font-size: 10px;
  line-height: 1.45;
}

.option-block {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.segmented-compact {
  height: 34px;
}

.segmented-compact button {
  font-size: 11.5px;
}

.colour-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  color: var(--content-muted);
  font-size: 11px;
  cursor: pointer;
}

.colour-row input[type="color"] {
  width: 30px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.colour-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: #fff;
}

.select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--content-muted);
  font-size: 11px;
}

.select-row select {
  min-width: 108px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-control);
  color: var(--content-primary);
  font-size: 11px;
}

.switch-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(240, 251, 255, 0.045);
}

.switch-row:last-child {
  border-bottom: 0;
}

.switch-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.switch-copy strong {
  color: #d3dddf;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.switch-copy small {
  color: var(--content-dim);
  font-size: 9.5px;
  line-height: 1.4;
}

.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #333b3d;
  transition: background-color 160ms var(--ease);
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #9aa7aa;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}

.switch-row input:checked + .switch-ui {
  background: rgba(93, 216, 254, 0.32);
}

.switch-row input:checked + .switch-ui::after {
  transform: translateX(15px);
  background: var(--brand);
}

.switch-row input:focus-visible + .switch-ui {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* 14. Result stage + tips ------------------------------------------------ */
.result-stage {
  display: flex;
  align-items: center;
  width: 100%;
}

.result-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(93, 216, 254, 0.2);
  border-radius: 6px;
  background: rgba(93, 216, 254, 0.055);
  color: #b9c8cc;
  font-size: 10.5px;
  line-height: 1.5;
}

.result-tip svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--brand);
}

.result-tip strong {
  color: #e6f6fa;
  font-weight: 700;
}

.inline-link {
  padding: 0;
  color: var(--brand);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link:hover {
  color: var(--brand-soft);
}

/* 15. Use-case section --------------------------------------------------- */
.use-cases-section {
  background:
    radial-gradient(720px 300px at 50% 0, rgba(79, 43, 255, 0.12), transparent 70%),
    var(--canvas-deep);
  border-top: 1px solid rgba(240, 251, 255, 0.045);
  border-bottom: 1px solid rgba(240, 251, 255, 0.045);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.use-case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 186px;
  padding: 22px 22px 20px;
  overflow: hidden;
  border: 1px solid #2f3a3d;
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(93, 216, 254, 0.05), transparent 55%),
    rgba(23, 27, 28, 0.8);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}

.use-case-card:hover {
  transform: translateY(-3px);
  border-color: #45575b;
}

.use-case-index {
  color: rgba(93, 216, 254, 0.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.use-case-card h3 {
  color: #f0fbff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.use-case-card p {
  color: var(--content-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 16. On-device card ----------------------------------------------------- */
.app-promo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(360px 130px at 0 0, rgba(93, 216, 254, 0.12), transparent 78%),
    var(--surface-raised);
}

.app-promo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(93, 216, 254, 0.28);
  border-radius: 11px;
  background: rgba(93, 216, 254, 0.1);
  color: var(--brand-soft);
}

.app-promo-badge svg {
  width: 21px;
  height: 21px;
}

.app-promo-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.app-promo-copy strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #f0fbff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
}

.app-promo-copy p {
  margin-top: 3px;
  color: var(--content-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.app-promo-source {
  display: block;
  margin-top: 5px;
  color: var(--content-dim);
  font-size: 10px;
  line-height: 1.35;
}

.app-promo .btn-pink {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
}

.promo-strip-brand svg {
  width: 32px;
  height: 32px;
  color: var(--brand);
}

.header-tool-icon {
  width: auto;
  height: 34px;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(93, 216, 254, 0.22);
  border-radius: 999px;
  background: rgba(93, 216, 254, 0.06);
  color: var(--brand-soft);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.header-tool-icon svg {
  width: 14px;
  height: 14px;
}

.header-tool-icon:hover {
  border-color: rgba(93, 216, 254, 0.5);
  background: rgba(93, 216, 254, 0.11);
}

/* 17. Responsive adjustments --------------------------------------------- */
@media (max-width: 1100px) {
  .use-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-tool-label {
    display: none;
  }

  .header-tool-icon {
    width: 34px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .app-promo {
    margin-top: 14px;
    padding: 12px 13px;
    gap: 11px;
  }

  .app-promo-badge {
    width: 38px;
    height: 38px;
  }

  .app-promo-copy strong {
    font-size: 11.5px;
  }

  .app-promo-copy p {
    font-size: 9.5px;
  }

  .app-promo .btn-pink {
    min-height: 28px;
    padding: 4px 11px;
    font-size: 10px;
  }

  .player-bar {
    padding: 8px 9px;
  }

  .frame-strip {
    padding: 7px 9px;
  }

  .preview-stage {
    padding: 10px;
  }

  .gif-canvas {
    max-height: 420px;
  }

  .compare {
    height: 420px;
  }
}

@media (max-width: 640px) {
  .use-case-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .use-case-card {
    min-height: 0;
    padding: 18px;
  }

  .player-step {
    display: none;
  }

  .gif-canvas {
    max-height: 340px;
  }

  .slider-stack {
    gap: 13px;
    margin-top: 16px;
  }

  .app-promo {
    flex-wrap: wrap;
  }

  .app-promo .btn-pink {
    width: 100%;
  }

  .result-tip {
    font-size: 10px;
  }
}

/* Result preview / unlock panel ----------------------------------------- */
.unlock-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(93, 216, 254, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(280px 110px at 0 0, rgba(93, 216, 254, 0.12), transparent 80%),
    rgba(16, 24, 27, 0.9);
}

.unlock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.unlock-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(93, 216, 254, 0.16);
  color: var(--brand-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unlock-frames {
  color: var(--content-dim);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.unlock-copy {
  margin: 0 0 12px;
  color: var(--content-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.unlock-note {
  margin: 9px 0 0;
  color: var(--content-dim);
  font-size: 9.5px;
  line-height: 1.45;
  text-align: center;
}

.unlock-panel .btn-primary {
  min-height: 42px;
  background: var(--accent-yellow);
  color: #1a1405;
}

.unlock-panel .btn-primary:hover {
  background: var(--accent-yellow-hover);
}

.credits-subhead {
  margin: 22px 0 10px;
  color: #dbe7ea;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.credit-packs.plans {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-pack .credit-amount small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
}

.account-plan {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(93, 216, 254, 0.05);
  color: var(--content-muted);
  font-size: 10.5px;
}

.account-plan strong {
  color: var(--brand-soft);
  font-size: 12px;
}

.account-plan small {
  color: var(--content-dim);
  font-size: 9.5px;
}

.downloads-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.downloads-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.downloads-head strong {
  color: #e8f5f8;
  font-size: 12px;
}

.downloads-head span {
  color: var(--content-dim);
  font-size: 9.5px;
  line-height: 1.45;
}

.downloads-empty {
  margin: 8px 0 0;
  color: var(--content-dim);
  font-size: 10px;
  line-height: 1.5;
}

.download-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.download-info strong {
  overflow: hidden;
  color: #dce7e9;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-info span {
  color: var(--content-dim);
  font-size: 9px;
}

.download-expiry {
  color: var(--brand-soft);
  font-size: 9px;
  white-space: nowrap;
}

.download-expiry.is-expired {
  color: #f08a8a;
}

.download-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 9.5px;
}

@media (max-width: 560px) {
  .download-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'info expiry'
      'info button';
  }

  .download-info { grid-area: info; }
  .download-expiry { grid-area: expiry; }
  .download-btn { grid-area: button; }
}

/* Real before/after examples -------------------------------------------- */
.real-examples {
  border-top: 1px solid var(--border);
}

.real-lead {
  max-width: 760px;
  margin: -8px 0 24px;
  color: var(--content-muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.real-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

.real-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.real-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  margin: 0;
  padding: 18px;
  background: #111718;
}

.real-frame.is-after {
  background-color: #1b2426;
  background-image:
    linear-gradient(45deg, #263235 25%, transparent 25%),
    linear-gradient(-45deg, #263235 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #263235 75%),
    linear-gradient(-45deg, transparent 75%, #263235 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.real-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

.real-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(8, 12, 13, 0.72);
  color: #dce7e9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.real-frame.is-after .real-label {
  border-color: rgba(93, 216, 254, 0.35);
  color: var(--brand-soft);
}

.real-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.real-meta strong {
  color: #e8f5f8;
  font-size: 12.5px;
}

.real-meta span {
  color: var(--content-dim);
  font-size: 9.5px;
  text-align: right;
}

.real-credit {
  margin: 14px 0 0;
  color: var(--content-dim);
  font-size: 9.5px;
  line-height: 1.5;
}

body.simple-tool #real-examples {
  display: none;
}

@media (max-width: 720px) {
  .real-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .real-frame {
    min-height: 180px;
    padding: 12px;
  }

  .real-meta {
    flex-direction: column;
    gap: 3px;
  }

  .real-meta span {
    text-align: left;
  }
}

.hero-subtitle {
  max-width: 700px;
  margin: 12px auto 0;
  font-size: 16px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .hero-subtitle {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .promo-brand,
  .promo-description,
  .promo-offer,
  .promo-new {
    display: none;
  }

  .promo-inner {
    justify-content: flex-start;
    gap: 8px;
    padding-right: 44px;
  }

  .promo-headline {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .promo-cta {
    flex: 0 0 auto;
  }

  #workspace[data-state="empty"] .settings-footer {
    display: none;
  }
}

/* Compact keyword landing pages ----------------------------------------- */
body.simple-tool .promo-strip,
body.simple-tool .app-promo,
body.simple-tool .recent-card,
body.simple-tool .cta-section {
  display: none !important;
}

body.simple-tool #promoBarMount {
  display: none;
}

body.simple-tool .tool-tabs {
  display: none;
}

body.simple-tool .dropzone {
  min-height: 400px;
}

body.simple-tool .settings-footer .free-label {
  display: none;
}

body.simple-tool .dropzone {
  min-height: 400px;
}

body.simple-tool .settings-footer .free-label {
  display: none;
}

/* The API removes backgrounds automatically; these controls were unused. */
.tool-layout {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.settings-pane {
  border-top: 1px solid var(--border);
  border-left: 0;
}

.settings-content {
  display: none;
}

.settings-footer {
  padding: 16px 20px 14px;
  border-top: 0;
}

.settings-footer .free-label,
.manual-toolbar {
  display: none !important;
}

.dropzone {
  min-height: 400px;
}

@media (max-width: 720px) {
  .credit-packs.plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

