:root {
  --ink: #171714;
  --muted: #68685f;
  --line: #deded4;
  --paper: #f5f5ec;
  --white: #fffefa;
  --acid: #d7ff42;
  --acid-deep: #a7d400;
  --danger: #a53426;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(30, 30, 20, 0.09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--acid); font-size: 11px; letter-spacing: .04em; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.privacy-dot { width: 8px; height: 8px; border-radius: 99px; background: #2bc56d; box-shadow: 0 0 0 4px rgba(43, 197, 109, .12); }

.tool-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto 92px; }
.tool-heading { min-height: 150px; display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 22px 2px 26px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: #596900; font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(48px, 7vw, 90px); line-height: .9; letter-spacing: -.075em; }
.model-status { flex: none; display: flex; align-items: center; gap: 9px; margin: 0 0 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.status-dot { width: 9px; height: 9px; border-radius: 99px; background: #d9a41d; animation: pulse 1.2s infinite; }
.model-status.ready .status-dot { background: #2bc56d; animation: none; }
.model-status.failed .status-dot { background: var(--danger); animation: none; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }

.workspace { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 555px; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.input-panel, .output-panel { padding: clamp(22px, 3.2vw, 42px); min-width: 0; }
.input-panel { border-right: 1px solid var(--line); }
.output-panel { background: #20201c; color: var(--white); display: flex; flex-direction: column; }
.panel-label { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 14px; }
.panel-label span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.drop-zone { position: relative; min-height: 205px; border: 1.5px dashed #b9b9ad; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; overflow: hidden; cursor: pointer; text-align: center; transition: .2s ease; background: #fbfbf6; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--ink); background: #f1f2e5; transform: translateY(-2px); }
.drop-zone.has-file { border-style: solid; border-color: var(--ink); }
.drop-zone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.drop-zone strong { font-size: 15px; }
.drop-zone > span:not(.upload-icon) { max-width: 92%; color: var(--muted); font-size: 11px; }
.upload-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: var(--ink); background: var(--acid); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.face-icon { border-radius: 50%; background: #dbe3ff; }
.drop-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #ecece4; }
.drop-zone::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.68)); opacity: 0; pointer-events: none; }
.drop-zone.has-file::after { opacity: 1; }
.drop-zone.has-file strong, .drop-zone.has-file > span:not(.upload-icon) { position: relative; z-index: 2; color: white; transform: translateY(62px); text-shadow: 0 1px 8px #000; }
.drop-zone.has-file .upload-icon { display: none; }
.remove-file { position: absolute; z-index: 3; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.72); color: white; cursor: pointer; font-size: 20px; line-height: 1; }
.clean-check { margin: 16px 0; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.clean-check input { position: absolute; opacity: 0; }
.check-ui { flex: none; width: 22px; height: 22px; border: 1.5px solid #99998f; border-radius: 7px; display: grid; place-items: center; }
.clean-check input:checked + .check-ui { background: var(--ink); border-color: var(--ink); }
.clean-check input:checked + .check-ui::after { content: "✓"; color: var(--acid); font-size: 13px; font-weight: 900; }
.clean-check > span:last-child { display: grid; gap: 2px; }
.clean-check strong { font-size: 13px; }
.clean-check small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.primary-button, .download-button { width: 100%; min-height: 54px; padding: 0 19px; border: 0; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: white; font-weight: 850; text-decoration: none; cursor: pointer; transition: .2s ease; }
.primary-button:hover:not(:disabled), .download-button:hover { transform: translateY(-2px); }
.primary-button:disabled { cursor: not-allowed; background: #d6d6ce; color: #77776f; }
.progress-wrap { margin-top: 15px; }
.progress-copy { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.progress-track { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #e5e5dc; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--acid-deep); transition: width .15s ease; }
.error-message { margin: 14px 0 0; color: var(--danger); font-size: 12px; line-height: 1.45; font-weight: 650; }

.result-stage { position: relative; flex: 1; min-height: 365px; border-radius: 18px; background: #151512; overflow: hidden; display: grid; place-items: center; }
.empty-result { padding: 25px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; color: #d3d3ca; }
.empty-result strong { color: white; font-size: 15px; }
.empty-result span:last-child { max-width: 280px; color: #96968e; font-size: 12px; line-height: 1.5; }
.result-loop { width: 58px; height: 58px; margin-bottom: 10px; border: 1px solid #4b4b44; border-radius: 50%; display: grid; place-items: center; color: var(--acid); font-size: 26px; }
#result-preview { display: block; width: 100%; height: 100%; object-fit: contain; }
.result-meta { margin: 15px 1px 12px; display: flex; justify-content: space-between; gap: 12px; color: #a9a99f; font-size: 11px; }
.download-button { flex: none; background: var(--acid); color: var(--ink); }
.local-note { margin: 16px 4px 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }

.content-section { width: min(1050px, calc(100% - 40px)); margin: 0 auto; padding: 84px 0; border-top: 1px solid var(--line); }
.content-section h2 { max-width: 780px; margin: 0 0 34px; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.055em; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fact-grid article { padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.fact-number { display: inline-block; margin-bottom: 42px; padding: 6px 9px; border-radius: 8px; background: var(--acid); font-size: 12px; font-weight: 900; }
.fact-grid h3, .steps-list h3 { margin: 0 0 8px; font-size: 18px; }
.fact-grid p, .steps-list p, .quality-card p, details p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.split-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; }
.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: grid; grid-template-columns: 34px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps-list li > span { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--acid); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.quality-card { padding: clamp(26px, 5vw, 56px); border-radius: 26px; background: var(--ink); }
.quality-card p { max-width: 880px; color: #e6e6dc; font-size: clamp(17px, 2.2vw, 25px); line-height: 1.55; letter-spacing: -.02em; }
.faq-section h2 { margin-bottom: 20px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 20px 2px; cursor: pointer; font-weight: 800; list-style: none; }
summary::after { content: "+"; float: right; font-size: 22px; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { max-width: 780px; padding: 0 0 24px; }
footer { width: min(1050px, calc(100% - 40px)); min-height: 100px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
footer span:first-child { color: var(--ink); font-weight: 900; }
.footer-nav { display: flex; align-items: center; gap: 18px; }
.footer-nav a { color: var(--muted); font-weight: 750; text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.page-main { width: min(860px, calc(100% - 40px)); margin: 48px auto 100px; }
.page-hero { padding: clamp(34px, 7vw, 76px); border: 1px solid var(--line); border-radius: 28px; background: var(--white); box-shadow: var(--shadow); }
.page-hero h1 { max-width: 760px; font-size: clamp(46px, 8vw, 82px); }
.page-lead { max-width: 680px; margin: 28px 0 0; color: var(--muted); font-size: clamp(17px, 2.4vw, 22px); line-height: 1.6; }
.page-copy { padding: 60px 4px 0; }
.page-copy section { padding: 34px 0; border-top: 1px solid var(--line); }
.page-copy h2 { margin: 0 0 14px; font-size: clamp(25px, 4vw, 38px); letter-spacing: -.04em; }
.page-copy p, .page-copy li { color: var(--muted); font-size: 15px; line-height: 1.75; }
.page-copy ul { margin: 14px 0 0; padding-left: 22px; }
.page-copy a { color: var(--ink); font-weight: 800; text-underline-offset: 3px; }

@media (max-width: 800px) {
  .site-header, .tool-shell, .content-section, footer, .page-main { width: min(100% - 24px, 680px); }
  .privacy-pill { font-size: 0; }
  .tool-heading { min-height: 128px; align-items: start; flex-direction: column; justify-content: end; gap: 14px; }
  h1 { font-size: clamp(46px, 16vw, 72px); }
  .model-status { margin: 0; }
  .workspace { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .output-panel { min-height: 510px; }
  .fact-grid, .split-section { grid-template-columns: 1fr; gap: 28px; }
  .content-section { padding: 62px 0; }
  footer { padding: 24px 0; flex-direction: column; align-items: start; }
  .footer-nav { flex-wrap: wrap; }
  .page-main { margin-top: 24px; margin-bottom: 64px; }
  .page-hero { padding: 32px 24px; border-radius: 20px; }
  .page-copy { padding-top: 36px; }
}

@media (max-width: 480px) {
  .site-header { height: 62px; }
  .tool-shell { margin-bottom: 58px; }
  .tool-heading { padding-top: 12px; }
  .workspace { border-radius: 20px; }
  .input-panel, .output-panel { padding: 18px; }
  .upload-grid { grid-template-columns: 1fr; }
  .drop-zone { min-height: 154px; }
  .drop-zone.has-file strong, .drop-zone.has-file > span:not(.upload-icon) { transform: translateY(39px); }
  .result-stage { min-height: 300px; }
  .result-meta { flex-direction: column; gap: 4px; }
  .fact-grid article { padding: 22px; }
  .fact-number { margin-bottom: 28px; }
}

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