:root {
  --blue: #3370d1;
  --blue-dark: #275bb0;
  --navy: #1d355d;
  --ink: #16202e;
  --muted: #5b6675;
  --line: #dfe4ea;
  --bg: #f5f7fa;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: var(--navy); color: #fff;
}
.brand { font-family: Oswald, Inter, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .5px; color: #fff; text-decoration: none; }
.brand span { color: #8fb6f2; }
.topcall { color: #fff; font-weight: 600; text-decoration: none; border: 1.5px solid rgba(255,255,255,.6); padding: 7px 14px; border-radius: 999px; font-size: 14px; }

main { max-width: 720px; margin: 0 auto; padding: 22px 18px 32px; }
.step { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1, h2 { font-family: Oswald, Inter, sans-serif; text-transform: uppercase; color: var(--navy); letter-spacing: .3px; margin: 6px 0 10px; }
h1 { font-size: clamp(30px, 7vw, 44px); line-height: 1.05; }
h2 { font-size: 24px; margin-top: 22px; }
.lead { font-size: 17px; color: var(--muted); line-height: 1.5; margin: 0 0 20px; }
.fine { font-size: 13px; color: var(--muted); line-height: 1.45; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 12px; border: 0;
  font: 600 17px Inter, sans-serif; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #a9bfe3; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; color: var(--blue); font: 600 15px Inter, sans-serif; padding: 10px 0; cursor: pointer; }

.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
@media (max-width: 420px) { .photo-actions { grid-template-columns: 1fr; } }
.tips { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.7; font-size: 15px; }

.preview-wrap { border-radius: var(--radius); overflow: hidden; background: #000; }
.preview-wrap img { display: block; width: 100%; max-height: 46vh; object-fit: contain; }

.blend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin: 4px 0 20px; }
.blend {
  background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 6px; cursor: pointer;
  text-align: center; font: 600 13px Inter, sans-serif; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.blend img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #e7eaee; margin-bottom: 6px; }
.blend[aria-checked="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,112,209,.2); }

.spinner { width: 54px; height: 54px; margin: 40px auto 18px; border-radius: 50%; border: 5px solid #d7e2f5; border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.compare { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; user-select: none; touch-action: pan-y; }
.compare > img { display: block; width: 100%; height: auto; }
.before-clip { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.before-clip img { display: block; height: 100%; width: auto; max-width: none; }
.handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; cursor: ew-resize; }
.handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--navy);
  display: grid; place-items: center; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.tag { position: absolute; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; font: 600 12px Inter, sans-serif; padding: 5px 10px; border-radius: 999px; }
.tag-left { left: 12px; } .tag-right { right: 12px; }

.result-actions { display: grid; gap: 12px; margin-top: 16px; }
.result-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; color: var(--navy); }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: 16px Inter, sans-serif; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,112,209,.18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error, .error { background: #fdecec; color: #a12121; border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.45; }
.error { margin-top: 16px; }

.foot { max-width: 720px; margin: 0 auto; padding: 0 18px 30px; color: var(--muted); font-size: 12px; line-height: 1.5; }
