:root {
  --navy: #00315b;
  --navy-deep: #002542;
  --blue: #0759b7;
  --blue-bright: #0876d9;
  --green: #00a83b;
  --yellow: #ffc800;
  --ink: #07325d;
  --muted: #66758a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 15% 28%, rgba(7,118,217,.72), transparent 34rem), radial-gradient(circle at 92% 15%, rgba(0,168,59,.18), transparent 22rem), linear-gradient(145deg, #003c76 0%, var(--navy-deep) 72%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
main { min-height: 100vh; overflow: hidden; }
.page-shell { position: relative; width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.page-shell::before, .page-shell::after { position: absolute; z-index: -1; border-radius: 999px; content: ""; transform: rotate(-13deg); }
.page-shell::before { top: 250px; right: -430px; width: 740px; height: 54px; background: var(--yellow); opacity: .9; }
.page-shell::after { top: 325px; right: -410px; width: 710px; height: 54px; background: var(--green); opacity: .9; }
.brand-bar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(255,255,255,.19); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; min-width: 84px; height: 44px; padding: 0 12px; border: 2px solid rgba(255,255,255,.62); border-radius: 13px; background: #fff; color: var(--blue); font-size: 25px; font-weight: 950; letter-spacing: -2px; box-shadow: 0 9px 24px rgba(0,20,45,.25); }
.privacy-pill { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(10px); }
.privacy-pill span { width: 8px; height: 8px; border-radius: 50%; background: #28df6a; box-shadow: 0 0 0 4px rgba(40,223,106,.15); }
.intro { padding: 34px 0 30px; color: #fff; text-align: center; }
.eyebrow, .step { color: var(--yellow); font-size: 12px; font-weight: 950; letter-spacing: .18em; }
.hero-number { margin: -4px auto -13px; color: #fff; font-size: clamp(88px, 12vw, 148px); font-weight: 1000; line-height: 1; letter-spacing: -.085em; text-shadow: 0 7px 0 rgba(0,19,43,.2), 0 22px 45px rgba(0,19,43,.3); -webkit-text-stroke: 2px rgba(255,255,255,.22); }
.intro h1 { margin: 0 auto 10px; max-width: 660px; color: #fff; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.055em; }
.intro h1 em { color: var(--yellow); font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.intro p { max-width: 590px; margin: 0 auto; color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.55; }
.editor-card { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(340px,.88fr); gap: 52px; align-items: center; padding: 38px; border: 1px solid rgba(255,255,255,.3); border-radius: 36px; background: rgba(255,255,255,.97); box-shadow: 0 30px 80px rgba(0,20,45,.38); }
.canvas-wrap { position: relative; aspect-ratio: 1; overflow: hidden; border: 5px solid #fff; border-radius: 28px; background: linear-gradient(rgba(234,244,255,.88), rgba(234,244,255,.88)), url("assets/frame.png") center/cover no-repeat; box-shadow: 0 16px 45px rgba(0,49,91,.22); }
.canvas-wrap::after { position: absolute; inset: 14px; border: 1px dashed rgba(0,70,140,.25); border-radius: 19px; content: ""; pointer-events: none; }
.canvas-wrap.has-image::after { display: none; }
canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
canvas.dragging { cursor: grabbing; }
.empty-preview { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; border: 0; background: transparent; color: var(--navy); cursor: pointer; }
.empty-preview[hidden] { display: none; }
.empty-icon { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 18px; border: 1px solid rgba(7,89,183,.12); border-radius: 24px; background: #fff; color: var(--blue); box-shadow: 0 12px 30px rgba(0,49,91,.14); }
.empty-icon svg { width: 34px; }
.empty-preview strong { font-size: 18px; }
.empty-preview small { margin-top: 7px; color: var(--muted); font-size: 13px; }
.drag-help { margin: 13px 0 0; color: var(--muted); text-align: center; font-size: 12px; font-weight: 650; }
.controls-column { display: flex; flex-direction: column; }
.controls-column h2 { margin: 8px 0; color: var(--navy); font-size: 28px; letter-spacing: -.035em; }
.controls-column p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.upload-button, .download-button { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 56px; margin-top: 24px; border: 0; border-radius: 17px; font-weight: 850; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.upload-button svg, .download-button svg { width: 22px; height: 22px; }
.upload-button { background: linear-gradient(135deg, var(--blue), var(--blue-bright)); color: #fff; box-shadow: 0 12px 25px rgba(7,89,183,.25); }
.adjustments { margin-top: 28px; padding: 25px 0 24px; border-top: 1px solid #dfe8f2; border-bottom: 1px solid #dfe8f2; }
.adjustments.disabled { opacity: .42; }
.adjustment-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.adjustment-title button { border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 800; cursor: pointer; }
.adjustments label { display: flex; justify-content: space-between; margin-bottom: 13px; color: var(--ink); font-size: 13px; font-weight: 750; }
.adjustments output { color: var(--muted); font-weight: 650; }
.range-row { display: grid; grid-template-columns: 22px 1fr 22px; align-items: center; gap: 12px; color: var(--blue); font-weight: 900; }
input[type="range"] { width: 100%; height: 5px; appearance: none; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--green), var(--yellow)); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; appearance: none; border: 4px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 2px 10px rgba(0,49,91,.35); }
.download-button { position: relative; overflow: hidden; background: var(--navy); color: #fff; box-shadow: 0 14px 28px rgba(0,49,91,.25); }
.download-button::after { position: absolute; right: 0; bottom: 0; width: 74px; height: 5px; background: linear-gradient(90deg, var(--green), var(--yellow)); content: ""; }
.upload-button:hover:not(:disabled), .download-button:hover:not(:disabled) { transform: translateY(-2px); }
.download-button:disabled { cursor: not-allowed; opacity: .35; box-shadow: none; }
.quality-note { margin-top: 11px !important; text-align: center; font-size: 11px !important; }
footer { display: flex; align-items: center; justify-content: center; gap: 13px; padding: 38px 0 48px; color: rgba(255,255,255,.72); font-size: 12px; }
footer strong { color: #fff; font-size: 27px; letter-spacing: -2px; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(255,200,0,.55); outline-offset: 3px; }

@media (max-width: 820px) {
  .page-shell { width: min(100% - 28px, 650px); }
  .intro { padding: 30px 0 26px; }
  .hero-number { font-size: clamp(92px, 24vw, 132px); }
  .intro h1 { font-size: clamp(31px, 9vw, 46px); }
  .editor-card { grid-template-columns: 1fr; gap: 34px; padding: 20px; border-radius: 28px; }
  .canvas-wrap { border-radius: 22px; }
  .controls-column { padding: 4px 5px 7px; }
}

@media (max-width: 500px) {
  .brand-bar { min-height: 70px; }
  .brand-label { display: none; }
  .privacy-pill { font-size: 10px; }
  .intro { padding-top: 25px; }
  .intro p { font-size: 14px; }
  .editor-card { gap: 27px; }
  footer { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
