:root {
  --ink: #151828;
  --muted: #667085;
  --line: #e2e6ef;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --violet: #7656ff;
  --violet-dark: #5c3de1;
  --cyan: #35c9d8;
  --green: #18a874;
  --shadow: 0 24px 70px rgba(27, 31, 55, .12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 10px 14px; color: #fff; background: #111827; border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 20; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(226,230,239,.8); backdrop-filter: blur(18px); }
.header-inner { min-height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.back-link, .mini-brand { text-decoration: none; font-weight: 800; }
.back-link { width: max-content; display: inline-flex; align-items: center; gap: 9px; color: #4f566b; font-size: .93rem; }
.back-link:hover { color: var(--violet-dark); }
.mini-brand { font-size: .84rem; letter-spacing: .18em; }
.language-switcher { justify-self: end; display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.lang-button { min-width: 38px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #687086; font-size: .76rem; font-weight: 900; cursor: pointer; }
.lang-button.is-active { color: #fff; background: var(--ink); box-shadow: 0 5px 12px rgba(21,24,40,.2); }

.hero { position: relative; overflow: hidden; padding: 70px 0 86px; background: linear-gradient(145deg, #fff 0%, #f8f7ff 56%, #eefafd 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .28; background-image: linear-gradient(rgba(72,80,110,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(72,80,110,.08) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent); }
.hero-orb { position: absolute; border-radius: 999px; filter: blur(5px); opacity: .35; pointer-events: none; }
.hero-orb-one { width: 360px; height: 360px; top: -180px; left: -130px; background: radial-gradient(circle, #9c88ff, transparent 70%); }
.hero-orb-two { width: 420px; height: 420px; right: -220px; bottom: -260px; background: radial-gradient(circle, #75e8ef, transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 50px; }
.eyebrow { margin: 0 0 14px; color: var(--violet-dark); font-size: .77rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 6px rgba(24,168,116,.12); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 620px; margin: 0; font-size: clamp(3rem, 6.4vw, 5.7rem); line-height: .95; letter-spacing: -.065em; }
.hero-lead { max-width: 610px; margin: 26px 0 22px; color: #596176; font-size: clamp(1.05rem, 2vw, 1.24rem); line-height: 1.7; }
.privacy-pill { width: max-content; max-width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: #117652; background: #eafff6; border: 1px solid #bfeedd; border-radius: 999px; font-size: .86rem; font-weight: 800; }
.privacy-pill svg { width: 20px; fill: currentColor; flex: 0 0 auto; }
.primary-link { width: max-content; display: inline-flex; align-items: center; gap: 14px; margin-top: 27px; padding: 14px 20px; color: #fff; background: var(--ink); border-radius: 14px; text-decoration: none; font-weight: 900; box-shadow: 0 14px 28px rgba(21,24,40,.2); transition: transform .2s ease, box-shadow .2s ease; }
.primary-link:hover { transform: translateY(-2px); box-shadow: 0 17px 34px rgba(21,24,40,.26); }
.hero-art-wrap { position: relative; min-width: 0; }
.hero-art-wrap::after { content: ""; position: absolute; width: 64%; height: 13%; left: 18%; bottom: 2%; border-radius: 50%; background: rgba(87,77,141,.15); filter: blur(22px); }
.hero-art { position: relative; z-index: 1; width: 100%; max-height: 620px; object-fit: contain; border-radius: 32px; }

.tool-section { position: relative; padding: 92px 0; }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading h2, .feature-copy h2, .privacy-copy h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.section-heading > p:last-child { color: var(--muted); margin: 17px auto 0; font-size: 1.03rem; }
.app-card { padding: 24px; background: rgba(255,255,255,.94); border: 1px solid rgba(218,222,232,.9); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.local-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 16px; color: #376556; background: #f0fbf7; border: 1px solid #d0eee3; border-radius: 14px; font-size: .86rem; }
.local-banner strong { margin-right: 4px; color: #145f46; }
.local-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; color: #fff; background: var(--green); border-radius: 50%; font-size: .74rem; font-weight: 900; }
.drop-zone { position: relative; display: grid; justify-items: center; padding: 56px 24px 48px; text-align: center; background: linear-gradient(135deg, #fbfbff, #f6fbfc); border: 2px dashed #bfc7d8; border-radius: 22px; cursor: pointer; outline: none; transition: border-color .2s, background .2s, transform .2s; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-dragging { border-color: var(--violet); background: #f5f2ff; transform: translateY(-1px); }
.upload-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px; color: var(--violet-dark); background: #ece8ff; border-radius: 22px; }
.upload-icon svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone h3 { margin: 0 0 6px; font-size: 1.35rem; }
.drop-zone p { margin: 0 0 20px; color: var(--muted); }
.file-button { display: inline-flex; padding: 12px 18px; color: #fff; background: var(--violet); border-radius: 12px; font-weight: 900; box-shadow: 0 10px 20px rgba(118,86,255,.25); }
.drop-zone small { margin-top: 17px; color: #8991a5; }
.workspace { display: grid; gap: 18px; }
.file-summary { display: flex; align-items: center; gap: 13px; padding: 11px; background: #f7f8fb; border: 1px solid var(--line); border-radius: 15px; }
.file-summary img { width: 54px; height: 54px; flex: 0 0 auto; object-fit: cover; border-radius: 11px; background: #e8ebf1; }
.file-meta { min-width: 0; display: grid; flex: 1; }
.file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { color: var(--muted); font-size: .83rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 900; cursor: pointer; }
.processing-status { padding: 18px 20px; background: #151827; color: #fff; border-radius: 17px; box-shadow: 0 14px 35px rgba(21,24,39,.18); }
.status-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.status-label { font-weight: 800; }
.progress-track { height: 9px; margin-top: 12px; overflow: hidden; background: rgba(255,255,255,.14); border-radius: 99px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--violet), #4bd3da); border-radius: inherit; transition: width .25s ease; }
.processing-status p { margin: 10px 0 0; color: #abb2c4; font-size: .78rem; }
.editor-grid { display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: 540px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.controls-panel { padding: 22px; background: #f7f8fb; border-right: 1px solid var(--line); }
.control-block + .control-block { margin-top: 27px; padding-top: 25px; border-top: 1px solid var(--line); }
.control-block h3, .control-block > label:first-child { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 13px; font-size: .9rem; font-weight: 900; }
.control-block output { color: var(--violet-dark); font-size: .78rem; }
.background-options { display: grid; gap: 8px; }
.background-option { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .86rem; font-weight: 800; }
.background-option.is-active { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(118,86,255,.11); }
.swatch { width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid #d3d8e3; border-radius: 8px; }
.checker, .compare-stage, .after-image { background-color: #fff; background-image: linear-gradient(45deg,#dfe3e9 25%,transparent 25%),linear-gradient(-45deg,#dfe3e9 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe3e9 75%),linear-gradient(-45deg,transparent 75%,#dfe3e9 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; }
.white { background: #fff; }
.custom { background: #7c3aed; }
.color-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.color-row input { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--violet); cursor: pointer; }
.control-block small { display: block; margin-top: 7px; color: #7b8498; font-size: .76rem; }
.engine-info { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 12px; background: #eef1f6; border-radius: 12px; }
.engine-light { width: 9px; height: 9px; flex: 0 0 auto; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(24,168,116,.1); }
.engine-info div { min-width: 0; display: grid; }
.engine-info strong { font-size: .82rem; }
.engine-info small { overflow: hidden; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.preview-panel { min-width: 0; padding: 18px; background: #fff; }
.preview-toolbar { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.preview-toolbar h3 { margin: 0; font-size: .96rem; }
.resolution-badge { padding: 5px 9px; color: #646d82; background: #f2f4f7; border-radius: 8px; font-size: .73rem; font-weight: 800; }
.compare-stage { position: relative; height: 464px; overflow: hidden; border: 1px solid #dce1e9; border-radius: 16px; background-color: #f8f9fb; }
.empty-preview { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; padding: 20px; color: #71798d; text-align: center; background: rgba(248,249,251,.86); backdrop-filter: blur(2px); }
.empty-preview svg { width: 62px; margin-bottom: 13px; fill: none; stroke: #a4abb9; stroke-width: 2; }
.empty-preview strong { color: #4b5264; }
.empty-preview span { margin-top: 4px; font-size: .85rem; }
.comparison { position: absolute; inset: 0; background: #edf0f5; }
.compare-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.before-image { background: #edf0f5; }
.after-clip { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 50% 0 0); }
.after-clip .after-image { max-width: none; }
.compare-divider { position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(16,19,29,.15); transform: translateX(-1px); pointer-events: none; }
.compare-divider span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--violet); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 8px 18px rgba(31,35,58,.25); transform: translate(-50%,-50%); }
.compare-range { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-label { position: absolute; z-index: 6; top: 14px; padding: 5px 9px; color: #fff; background: rgba(15,18,29,.75); border-radius: 8px; font-size: .7rem; font-weight: 900; pointer-events: none; }
.before-label { left: 14px; }
.after-label { right: 14px; }
.action-row { display: grid; grid-template-columns: auto minmax(190px, 1fr) minmax(190px, 1fr); gap: 12px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 18px; border: 0; border-radius: 13px; font-weight: 900; cursor: pointer; transition: transform .18s, opacity .18s, box-shadow .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-secondary { background: #edf0f5; color: #4c556a; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-dark)); box-shadow: 0 11px 24px rgba(92,61,225,.25); }
.button-download { color: #fff; background: var(--ink); box-shadow: 0 11px 24px rgba(21,24,40,.18); }
.button-ghost { background: #f1f3f7; color: #4c556a; }
.action-note { margin: -4px 0 0; color: #858da0; text-align: center; font-size: .78rem; }

.feature-section { padding: 92px 0; background: #fff; }
.feature-grid, .privacy-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(42px, 7vw, 90px); }
.feature-visual-card { min-width: 0; padding: 24px; background: linear-gradient(145deg, #f2efff, #ecfafa); border-radius: 36px; }
.feature-visual-card img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.feature-copy > p:not(.eyebrow), .privacy-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.check-list { display: grid; gap: 12px; margin: 25px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 31px; font-weight: 750; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 21px; height: 21px; color: #fff; background: var(--green); border-radius: 50%; font-size: .68rem; }
.privacy-section { padding: 92px 0; color: #fff; background: #111522; overflow: hidden; }
.privacy-copy .eyebrow { color: #7be5ec; }
.privacy-copy > p:not(.eyebrow) { color: #b9c0d0; }
.privacy-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.privacy-facts div { padding: 16px 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 15px; }
.privacy-facts strong, .privacy-facts span { display: block; }
.privacy-facts strong { color: #7be5ec; font-size: 1.35rem; }
.privacy-facts span { margin-top: 3px; color: #aeb6c8; font-size: .72rem; }
.privacy-art { width: min(100%, 500px); margin-inline: auto; object-fit: contain; filter: drop-shadow(0 25px 45px rgba(0,0,0,.25)); }
.details-section { padding: 84px 0; }
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.details-grid article { padding: 27px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 35px rgba(29,34,58,.06); }
.detail-number { color: var(--violet); font-size: .75rem; font-weight: 950; letter-spacing: .12em; }
.details-grid h3 { margin: 12px 0 7px; }
.details-grid p { margin: 0; color: var(--muted); font-size: .88rem; }
.browser-note { margin-top: 22px; padding: 15px 18px; color: #5c6579; background: #e9edf5; border-radius: 14px; text-align: center; font-size: .84rem; }

.large-dialog { width: min(480px, calc(100% - 30px)); padding: 0; color: var(--ink); background: #fff; border: 0; border-radius: 24px; box-shadow: 0 30px 100px rgba(9,12,22,.35); }
.large-dialog::backdrop { background: rgba(11,14,24,.64); backdrop-filter: blur(7px); }
.large-dialog form { display: grid; gap: 12px; padding: 28px; text-align: center; }
.dialog-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 2px; color: #8b5d00; background: #fff3cc; border-radius: 50%; font-size: 1.4rem; font-weight: 950; }
.large-dialog h2 { margin: 0; font-size: 1.55rem; }
.large-dialog p { margin: 0; color: var(--muted); }
.dialog-stats { margin: 5px 0 7px; padding: 10px; color: #6c541e; background: #fff8e8; border-radius: 11px; font-size: .83rem; font-weight: 800; }
.dialog-close { margin-top: 3px; color: #727b8f; background: none; border: 0; cursor: pointer; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: min(520px, calc(100% - 30px)); padding: 12px 17px; color: #fff; background: #171b29; border-radius: 12px; box-shadow: 0 15px 45px rgba(10,12,22,.3); opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .25s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #a82b3b; }
.site-footer { padding: 28px 0; color: #aeb6c7; background: #0b0e17; font-size: .81rem; }
.footer-inner { display: grid; justify-items: center; gap: 11px; text-align: center; }
.footer-inner p { margin: 0; }
.footer-inner a { color: #fff; font-weight: 800; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.license-note { color: #788195; font-size: .7rem; }

@media (max-width: 920px) {
  .hero { padding-top: 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 35px; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-art { max-height: 520px; }
  .editor-grid { grid-template-columns: 1fr; }
  .controls-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .control-block + .control-block { margin: 0; padding: 0; border: 0; }
  .engine-info { grid-column: 1 / -1; margin: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1160px); }
  .header-inner { grid-template-columns: 1fr auto; }
  .mini-brand { display: none; }
  .hero { padding: 45px 0 60px; }
  h1 { font-size: clamp(2.75rem, 14vw, 4.3rem); }
  .hero-art { border-radius: 23px; }
  .tool-section, .feature-section, .privacy-section { padding: 68px 0; }
  .app-card { padding: 14px; border-radius: 23px; }
  .local-banner { align-items: flex-start; }
  .drop-zone { padding: 42px 18px; }
  .controls-panel { grid-template-columns: 1fr; padding: 18px; }
  .engine-info { grid-column: auto; }
  .preview-panel { padding: 12px; }
  .compare-stage { height: min(440px, 65vh); min-height: 320px; }
  .action-row { grid-template-columns: 1fr 1fr; }
  .button-secondary { grid-column: 1 / -1; grid-row: 2; }
  .feature-grid, .privacy-grid { grid-template-columns: 1fr; }
  .privacy-art { grid-row: 1; }
  .details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-header { position: static; }
  .header-inner { min-height: 62px; gap: 8px; }
  .back-link { font-size: .77rem; }
  .lang-button { min-width: 32px; height: 31px; }
  .hero-lead { font-size: 1rem; }
  .privacy-pill { width: 100%; justify-content: center; border-radius: 14px; font-size: .78rem; }
  .file-summary img { width: 46px; height: 46px; }
  .editor-grid { min-height: 0; }
  .preview-toolbar { align-items: flex-start; }
  .preview-toolbar h3 { font-size: .85rem; }
  .compare-stage { min-height: 280px; height: 52vh; max-height: 430px; }
  .action-row { grid-template-columns: 1fr; }
  .button-secondary { grid-column: auto; grid-row: auto; order: 3; }
  .button { width: 100%; }
  .privacy-facts { grid-template-columns: 1fr; }
  .privacy-facts div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; text-align: left; }
  .privacy-facts span { margin: 0; }
}

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

@media print {
  .site-header, .hero, .feature-section, .privacy-section, .details-section, .site-footer, .local-banner, .controls-panel, .action-row, .file-summary { display: none !important; }
  .tool-section { padding: 0; }
  .app-card { box-shadow: none; border: 0; }
  .editor-grid { display: block; border: 0; }
  .compare-stage { height: 90vh; border: 0; }
}
