:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --elev: #f6f8fc;
  --line: #e6eaf2;
  --line-2: #d7deea;
  --text: #1a1d26;
  --muted: #5b6475;
  --faint: #8b93a3;
  --accent: #3d7eff;
  --accent-ink: #ffffff;
  --danger: #e23d3d;
  --ok: #1a9e63;
  --sans: "DM Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --check-a: #eceff4;
  --check-b: #ffffff;
  --shadow: 0 12px 40px rgba(28, 39, 64, 0.10);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--sans);
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
::selection { background: #d6e4ff; }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

.nav, .app-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--line); background: #fff;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.04em; font-size: 20px;
}
.logo { width: 28px; height: 28px; border-radius: 8px; display: block; }
.nav-cta { min-height: 36px; padding: 0 14px; font-size: 14px; }
.try-label { margin: 22px 0 10px; color: var(--faint); font-size: 14px; }
.samples { display: flex; gap: 10px; justify-content: center; }
.samples button {
  width: 64px; height: 64px; padding: 0; border: 2px solid #fff;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  box-shadow: 0 4px 14px rgba(28,39,64,.18); background: #ddd;
}
.samples img { width: 100%; height: 100%; object-fit: cover; display: block; }
.samples button:hover { transform: translateY(-1px); }

.wipe-block { text-align: center; padding: 8px 20px 80px; }
.wipe-block h2 {
  margin: 0 0 22px; font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.04em;
}
.wipe {
  position: relative; width: min(420px, 100%); margin: 0 auto;
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 3 / 4; background: var(--check-b);
  background-image:
    linear-gradient(45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--check-a) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wipe-after {
  clip-path: inset(0 100% 0 0);
  animation: wipe-run 1.7s cubic-bezier(.22,.8,.28,1) .45s forwards;
}
@keyframes wipe-run { to { clip-path: inset(0 0 0 0); } }
.wipe-cap { margin: 12px 0 0; color: var(--faint); font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  .wipe-after { animation: none; clip-path: inset(0 0 0 0); }
}
.mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.nav-links { display: flex; gap: 22px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.meter { font-family: var(--mono); font-size: 12px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 10px; border: 0;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-acc { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(61,126,255,.28); }
.btn-acc:hover { filter: brightness(1.06); }
.btn-ghost { background: #fff; border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--elev); }

.rb-hero { text-align: center; padding: 56px 20px 28px; }
.rb-hero h1 {
  margin: 0 0 10px; font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.045em; line-height: 1.05; font-weight: 800;
}
.rb-hero .sub { margin: 0 0 32px; color: var(--muted); font-size: 18px; }

.rb-card {
  width: min(560px, 100%); margin: 0 auto;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: 36px 28px 28px; cursor: pointer;
  border: 1px solid var(--line);
}
.rb-card.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.rb-card .upload {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px rgba(61,126,255,.3); pointer-events: none;
}
.rb-card .hint { margin: 16px 0 0; color: var(--faint); font-size: 14px; }
.rb-card .note { display: block; margin-top: 8px; color: var(--faint); font-size: 13px; }

.checker, .thumb img, .stage, .rb-preview {
  background-color: var(--check-b);
  background-image:
    linear-gradient(45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--check-a) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.rb-preview {
  position: relative; height: 360px; border-radius: 12px; overflow: hidden; cursor: default;
}
.rb-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }

.rb-actions { display: flex; gap: 10px; justify-content: center; margin: 16px auto 8px; width: min(560px, 100%); flex-wrap: wrap; }
.rb-film {
  width: min(920px, 100%); margin: 18px auto 64px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.job {
  display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.job.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,126,255,.12); }
.thumb { position: relative; width: 72px; height: 56px; border-radius: 8px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.job strong { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 12px; color: var(--faint); }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }
.lock {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.55); font-size: 11px; font-weight: 700;
}

.cmp { --pos: 50%; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--elev); }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 32px; letter-spacing: -0.04em; margin: 20px 0 8px; }
.form { display: grid; gap: 10px; margin-top: 20px; }
input {
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; outline: none;
}
input:focus { border-color: var(--accent); }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; }

.gate { position: fixed; inset: 0; background: rgba(16,22,36,.45); display: grid; place-items: center; padding: 20px; z-index: 30; }
.gate[hidden] { display: none; }
.gate-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.gate-card h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.03em; }
.gate-card p { color: var(--muted); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.prices-hero { padding: 48px 0 12px; max-width: 640px; }
.prices-hero h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.04em; margin: 0 0 12px; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 24px 0 80px; max-width: 760px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.card.hl { border-color: var(--accent); }
.card h3 { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.price { font-size: 40px; letter-spacing: -0.05em; margin: 12px 0; font-weight: 750; }
.price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.was { font-size: 16px; color: var(--faint); text-decoration: line-through; margin-left: 8px; }
.card ul { margin: 0 0 20px; padding-left: 18px; color: var(--muted); }

.app { min-height: 100vh; }
.lead { color: var(--muted); }

@media (max-width: 700px) {
  .prices { grid-template-columns: 1fr; }
  .nav, .app-nav { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
