:root {
  --navy: #07152e;
  --blue: #0b3d82;
  --yellow: #ffc800;
  --cream: #f5f4ef;
  --muted: #657084;
  --line: #dfe3e8;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
  touch-action: pan-y pinch-zoom;
}

body {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  color: var(--navy);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.ambient { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; contain: strict; }
.ambient-one { width: 420px; height: 420px; top: -230px; left: -180px; background: rgba(255, 200, 0, .18); }
.ambient-two { width: 520px; height: 520px; right: -280px; bottom: -300px; background: rgba(11, 61, 130, .07); }

.topbar {
  width: min(1160px, calc(100% - 48px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 58px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; color: white; background: var(--navy);
  box-shadow: inset 0 -4px 0 var(--yellow);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 15px; text-transform: uppercase; letter-spacing: -.2px; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.official-pill { padding: 9px 13px; border: 1px solid rgba(7,21,46,.12); border-radius: 999px; color: #4c586a; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.55); }
.official-pill i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px rgba(34,160,107,.13); }

.page-shell {
  width: min(1100px, calc(100% - 48px));
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  padding: 44px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, .78fr);
  align-items: center;
  gap: clamp(70px, 10vw, 140px);
}

.eyebrow { display: inline-flex; padding: 7px 11px; border-radius: 7px; color: var(--blue); background: rgba(11,61,130,.08); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.intro h1 { margin: 18px 0 18px; font-family: Manrope, sans-serif; font-size: clamp(48px, 5.2vw, 72px); line-height: .98; letter-spacing: -.055em; }
.intro h1 em { color: var(--blue); font-style: normal; position: relative; }
.intro h1 em::after { content: ""; position: absolute; left: 2%; right: -3%; height: 7px; bottom: -2px; background: var(--yellow); border-radius: 50%; transform: rotate(-1.5deg); z-index: -1; }
.intro > p { max-width: 450px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.intro > p strong { color: var(--navy); font-weight: 700; }

.steps { display: flex; align-items: center; margin: 38px 0 34px; }
.steps > div { display: flex; align-items: center; gap: 10px; }
.steps > div > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(7,21,46,.14); border-radius: 50%; font-family: Manrope, sans-serif; font-size: 11px; font-weight: 800; background: white; }
.steps p { display: flex; flex-direction: column; margin: 0; }
.steps strong { font-size: 12px; }
.steps small { margin-top: 2px; color: #8991a0; font-size: 9px; white-space: nowrap; }
.steps > i { width: 28px; height: 1px; margin: 0 12px; background: #d4d7dc; }

.share-link-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: -9px 0 25px; padding: 14px 22px; border: 2px solid var(--navy); border-radius: 12px; color: var(--navy); background: var(--yellow); box-shadow: 0 7px 0 var(--navy), 0 15px 28px rgba(7,21,46,.16); font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.share-link-button:hover { box-shadow: 0 5px 0 var(--navy), 0 13px 24px rgba(7,21,46,.2); transform: translateY(2px); }
.share-link-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.privacy-note { display: inline-flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border: 1px solid rgba(7,21,46,.07); border-radius: 12px; background: rgba(255,255,255,.55); }
.privacy-note svg { width: 18px; margin-top: 1px; fill: none; stroke: #3e8b69; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.privacy-note p { margin: 0; color: #7a8390; font-size: 10px; line-height: 1.5; }
.privacy-note strong { color: #445064; font-size: 11px; }

.editor-card { position: relative; padding: 25px; border: 1px solid rgba(7,21,46,.08); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(7,21,46,.11), 0 2px 4px rgba(7,21,46,.04); }
.editor-heading { min-height: 45px; margin-bottom: 19px; display: flex; align-items: center; justify-content: space-between; }
.editor-heading > div { display: flex; align-items: center; gap: 12px; }
.section-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--yellow); font-family: Manrope, sans-serif; font-size: 10px; font-weight: 800; }
.editor-heading h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 17px; letter-spacing: -.02em; }
.editor-heading p { margin: 3px 0 0; color: #8a92a0; font-size: 10px; }
.text-button { padding: 7px; border: 0; color: var(--blue); background: none; font-size: 11px; font-weight: 700; cursor: pointer; }

.canvas-wrap { position: relative; aspect-ratio: 1; overflow: hidden; border: 4px solid white; border-radius: 50%; background-color: #edf0f3; background-image: linear-gradient(45deg,#e4e7ea 25%,transparent 25%),linear-gradient(-45deg,#e4e7ea 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e4e7ea 75%),linear-gradient(-45deg,transparent 75%,#e4e7ea 75%); background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0; box-shadow: 0 0 0 1px rgba(7,21,46,.09), 0 14px 32px rgba(7,21,46,.13); touch-action: pan-y; user-select: none; }
#editorCanvas { width: 100%; height: 100%; display: block; clip-path: circle(50% at 50% 50%); touch-action: pan-y; }
.canvas-wrap.photo-ready #editorCanvas { touch-action: none; }
.upload-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(242,244,246,.93); transition: opacity .25s ease; }
.upload-icon { width: 54px; height: 54px; margin-bottom: 15px; display: grid; place-items: center; border: 1px dashed #aab3c0; border-radius: 17px; background: white; transform: rotate(-3deg); }
.upload-icon svg { width: 24px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform: rotate(3deg); }
.upload-state h3 { margin: 0; font-family: Manrope, sans-serif; font-size: 16px; }
.upload-state p { margin: 8px 0 17px; color: #7d8796; font-size: 11px; line-height: 1.5; }
.upload-state small { margin-top: 10px; color: #9ba2ad; font-size: 8px; }

.primary-button { border: 0; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 11px; color: white; background: var(--blue); font-weight: 700; cursor: pointer; box-shadow: 0 9px 18px rgba(11,61,130,.18); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.primary-button:hover { transform: translateY(-1px); background: #0c478f; box-shadow: 0 12px 22px rgba(11,61,130,.23); }
.primary-button:active { transform: translateY(1px); }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.primary-button.compact { min-width: 154px; padding: 12px 17px; font-size: 11px; }
.gesture-hint { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; width: max-content; padding: 7px 10px; border-radius: 999px; color: white; background: rgba(7,21,46,.9); font-size: 8px; pointer-events: none; animation: hintFade 5s 1s both; }
.gesture-hint svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@keyframes hintFade { 0%,65% { opacity: 1 } 100% { opacity: 0 } }

.controls { padding: 18px 3px 0; }
.zoom-row { display: grid; grid-template-columns: 18px 1fr 18px; align-items: center; gap: 11px; }
.zoom-row svg { width: 17px; fill: none; stroke: #657084; stroke-width: 1.8; stroke-linecap: round; }
input[type="range"] { appearance: none; width: 100%; height: 4px; border-radius: 99px; background: linear-gradient(to right, var(--blue) var(--range, 0%), #dfe3e8 var(--range, 0%)); outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 1px 5px rgba(7,21,46,.35); }
.tool-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }
.tool-row button { padding: 9px 5px; border: 1px solid #e2e5e9; border-radius: 9px; display: flex; justify-content: center; align-items: center; gap: 6px; color: #536074; background: white; font-size: 9px; font-weight: 600; cursor: pointer; }
.tool-row button:hover { border-color: #b7c3d2; color: var(--blue); }
.tool-row svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-button { width: 100%; margin-top: 17px; padding: 14px; font-size: 12px; }
.download-note { margin: 9px 0 0; color: #99a0aa; font-size: 8px; text-align: center; }
.device-save-note { padding: 9px 11px; border: 1px solid rgba(11,61,130,.1); border-radius: 9px; color: #536074; background: rgba(11,61,130,.055); font-size: 9px; font-weight: 600; line-height: 1.45; }

.supporter-panel { margin: 22px -25px -25px; padding: 0 25px 25px; border-top: 1px solid #e4e7eb; background: #fbfbfa; border-radius: 0 0 24px 24px; }
.panel-progress { height: 3px; margin: 0 -25px 23px; overflow: hidden; background: #e8ebee; }
.panel-progress span { display: block; width: 66%; height: 100%; background: var(--yellow); }
.supporter-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.supporter-heading .section-number { flex: 0 0 auto; margin-top: 3px; }
.mini-label { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.supporter-heading h2, .support-success h2 { margin: 2px 0 3px; font-family: Manrope, sans-serif; font-size: 18px; letter-spacing: -.03em; }
.supporter-heading p, .support-success > p { margin: 0; color: #7d8796; font-size: 10px; line-height: 1.45; }
.field-label { display: block; margin: 0 0 6px; color: #354156; font-size: 10px; font-weight: 700; }
.field-label small { color: #959da8; font-size: 8px; font-weight: 500; }
.field-input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dfe3e8; border-radius: 9px; color: var(--navy); background: white; font-size: 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field-input::placeholder { color: #a7aeb8; }
.field-input:focus { border-color: #4e78ac; box-shadow: 0 0 0 3px rgba(11,61,130,.09); }
.field-hint { display: block; margin: 5px 2px 0; color: #818b99; font-size: 8px; line-height: 1.35; }
.field-select { padding-right: 34px; appearance: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23657084' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center/16px no-repeat; cursor: pointer; }
.other-city-input { margin-top: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.consent-row { display: grid; grid-template-columns: 17px 1fr; align-items: flex-start; gap: 9px; margin-top: 15px; color: #697486; font-size: 9px; line-height: 1.45; cursor: pointer; }
.consent-row input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1px solid #b9c1cb; border-radius: 5px; background: white; cursor: pointer; }
.consent-row input:checked { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat; }
.privacy-details { margin-top: 9px; color: #788292; font-size: 8px; }
.privacy-details summary { color: var(--blue); font-weight: 700; cursor: pointer; }
.privacy-details p { margin: 7px 0 0; line-height: 1.5; }
.form-feedback { margin: 12px 0 0; padding: 9px 10px; border-radius: 8px; color: #7b2532; background: #fbeaec; font-size: 9px; line-height: 1.4; }
.register-button { width: 100%; margin-top: 15px; padding: 13px; font-size: 11px; }
.register-button:disabled { opacity: .65; cursor: wait; transform: none; }
.after-download-share-button { width: 100%; min-height: 49px; margin-top: 11px; border: 2px solid var(--navy); border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--navy); background: var(--yellow); box-shadow: 0 5px 0 var(--navy), 0 11px 20px rgba(7,21,46,.13); font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.after-download-share-button:hover { box-shadow: 0 3px 0 var(--navy), 0 9px 17px rgba(7,21,46,.16); transform: translateY(2px); }
.after-download-share-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-success { padding: 8px 0 3px; text-align: center; }
.success-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; color: #178454; background: #dff5e9; }
.success-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.support-success > p { max-width: 290px; margin: 6px auto 17px; }
.whatsapp-button, .secondary-share-button { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-decoration: none; cursor: pointer; }
.whatsapp-button { color: white; background: #178a55; box-shadow: 0 8px 16px rgba(23,138,85,.16); }
.whatsapp-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.group-pending { margin: 0 0 12px !important; padding: 10px; border-radius: 8px; color: #7d8796 !important; background: #eff1f3; font-size: 9px !important; }
.secondary-share-button { min-height: 48px; margin-top: 11px; border: 2px solid var(--navy); color: var(--navy); background: var(--yellow); box-shadow: 0 5px 0 var(--navy); font-size: 11px; }
.secondary-share-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 10; display: flex; align-items: center; gap: 8px; padding: 12px 17px; border-radius: 10px; color: white; background: #153c2d; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 12px; font-weight: 600; opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; fill: none; stroke: #7ee2b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.analytics-consent { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; width: auto; max-width: 620px; max-height: calc(100dvh - 24px); margin: 0 auto; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; overflow-y: auto; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; color: white; background: #07152e; box-shadow: 0 18px 55px rgba(0,0,0,.38); }
.analytics-consent strong { display: block; font-size: 12px; }
.analytics-consent p { max-width: 390px; margin: 4px 0 0; color: #cad2df; font-size: 9px; line-height: 1.45; }
.analytics-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.analytics-actions button { min-height: 38px; padding: 8px 12px; border-radius: 9px; font-size: 9px; font-weight: 700; cursor: pointer; }
.analytics-decline { border: 1px solid rgba(255,255,255,.28); color: white; background: transparent; }
.analytics-accept { border: 1px solid var(--yellow); color: var(--navy); background: var(--yellow); }

@media (max-width: 820px) {
  .topbar { width: min(100% - 32px, 620px); height: 74px; }
  .official-pill { display: none; }
  .page-shell { width: min(100% - 28px, 560px); padding: 25px 0 52px; display: flex; flex-direction: column; gap: 31px; }
  .intro { width: 100%; text-align: center; }
  .intro h1 { margin: 14px 0; font-size: clamp(40px, 12vw, 58px); }
  .intro > p { margin: 0 auto; max-width: 370px; font-size: 14px; line-height: 1.55; }
  .steps { justify-content: center; margin: 25px 0 0; }
  .steps small { display: none; }
  .steps > i { width: clamp(12px, 6vw, 32px); margin: 0 7px; }
  .privacy-note { display: none; }
  .share-link-button { width: 100%; margin: 14px 0 0; }
  .analytics-consent { align-items: stretch; flex-direction: column; gap: 14px; padding: 20px 17px; text-align: center; }
  .analytics-consent p { max-width: none; font-size: 10px; }
  .analytics-actions { display: grid; grid-template-columns: 1fr; }
  .analytics-actions button { width: 100%; min-height: 44px; font-size: 10px; }
  .editor-card { width: 100%; padding: 17px; border-radius: 21px; }
  .canvas-wrap { border-width: 3px; border-radius: 50%; }
  .supporter-panel { margin: 22px -17px -17px; padding: 0 17px 20px; border-radius: 0 0 21px 21px; }
  .panel-progress { margin: 0 -17px 20px; }
}

@media (max-width: 390px) {
  .page-shell { width: calc(100% - 20px); }
  .brand-mark { width: 54px; height: 40px; font-size: 14px; }
  .editor-card { padding: 13px; }
  .supporter-panel { margin: 20px -13px -13px; padding: 0 13px 17px; }
  .panel-progress { margin: 0 -13px 18px; }
  .editor-heading { padding: 3px; margin-bottom: 13px; }
  .steps > div { gap: 6px; }
  .steps > div > span { width: 27px; height: 27px; }
  .steps strong { font-size: 10px; }
  .field-grid { grid-template-columns: 1fr; }
}

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