:root {
  --blue: #14468d;
  --blue-press: #0f3874;
  --yellow: #ffcc29;
  --green: #00a859;
  --ink: #101010;
  --muted: #3d4a5c;
  --paper: #f4f6f8;
  --line: rgba(20, 70, 141, 0.16);
  --white: #ffffff;
  --font: "Outfit", "Arial Nova", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
}

button, input, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }

.shell {
  min-height: 100vh;
}

.brand {
  background: var(--blue);
  color: var(--white);
  padding: 14px 16px 12px;
  padding-top: calc(14px + env(safe-area-inset-top));
}

.brand-top,
.brand-foot {
  width: min(100%, 340px);
  margin-inline: auto;
}

.brand-logo {
  display: block;
  width: min(42vw, 156px);
  height: auto;
  margin-inline: auto;
}

.brand-copy { display: none; }

.brand-foot { margin-top: 10px; }

.colinha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  text-decoration: none;
}

.colinha small {
  display: block;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.colinha strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 800;
}

.colinha-arrow {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--yellow);
  position: relative;
}

.colinha-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  transform: translateY(-50%) rotate(45deg);
}

.colinha:hover { background: rgba(255, 255, 255, 0.16); }

.brand-legal {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  overflow-x: clip;
  padding: 16px 16px 40px;
}

.stage {
  width: min(100%, 760px);
  max-width: 100%;
  min-width: 0;
}

.work {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-main { min-width: 0; }

.saved {
  display: flex;
  gap: 10px;
  order: -1;
  overflow-x: auto;
}

.saved-card {
  flex: 0 0 132px;
  width: 132px;
  background: var(--white);
  border-radius: 14px;
  padding: 8px;
}

.saved-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.saved-open img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--paper);
}

.saved-open span {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 96px;
  background: rgba(8, 18, 40, 0.94);
}

.viewer-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.viewer img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.viewer-close {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--blue);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}

body.viewer-open { overflow: hidden; }

.saved-card p {
  margin: 8px 0 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.saved .btn {
  min-height: 36px;
  margin-top: 8px;
  padding: 8px;
  font-size: 13px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.step { min-width: 0; }

.step i {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgba(20, 70, 141, 0.16);
}

.step.done i { background: var(--blue); }
.step.now i { background: var(--yellow); }

.step b {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #8b95a3;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.step.now b { color: var(--blue); }

.sheet {
  background: var(--white);
  border-radius: 16px;
  padding: 22px 18px 18px;
  box-shadow: 0 1px 0 rgba(16, 16, 16, 0.04);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.copy p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
}

.copy p:last-child { margin-bottom: 0; }

.copy .fine {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.facts div {
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
}

.facts small {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.actions.choices { grid-template-columns: 1fr; }

.sheet-foot {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.choice, .btn, .ghost {
  border-radius: 12px;
  min-height: 52px;
  padding: 14px 16px;
  cursor: pointer;
}

.choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  text-align: left;
  background: var(--white);
  border: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 800;
  font-size: 17px;
}

.choice small {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.choice:hover,
.choice:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.ratio {
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.ratio-feed { width: 28px; height: 37px; }
.ratio-story { width: 24px; height: 42px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  background: var(--yellow);
  color: var(--blue);
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  text-decoration: none;
}

.gallery .btn { margin-top: 14px; }

.btn:hover { filter: brightness(0.97); }

.btn:disabled,
.choice:disabled,
.ghost:disabled {
  cursor: progress;
  opacity: 0.65;
}

.ghost {
  width: 100%;
  background: transparent;
  border: 2px solid var(--line);
  color: var(--blue);
  font-weight: 700;
}

.ghost.quiet {
  border: 0;
  min-height: 40px;
  color: var(--muted);
  font-weight: 600;
}

.field { display: grid; gap: 8px; margin-top: 18px; }

.field span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(20, 70, 141, 0.35);
  border-radius: 12px;
  padding: 14px 14px;
  background: var(--white);
  outline: none;
  font-size: 16px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 70, 141, 0.12);
}

.field textarea { min-height: 120px; resize: vertical; }

.counter {
  margin: 0;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.drop {
  margin-top: 18px;
  border: 2px dashed var(--blue);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  background: rgba(20, 70, 141, 0.04);
}

.drop strong { display: block; color: var(--blue); font-size: 18px; }

.drop p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  background: var(--blue);
  color: var(--white);
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
}

.file-btn input { display: none; }
button.file-btn {
  border: 0;
  font: inherit;
  font-weight: 800;
}

.preview {
  display: block;
  width: min(100%, 220px);
  height: auto;
  margin: 14px auto 0;
  border-radius: 12px;
}

.card-shot {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: var(--paper);
}

.wait { margin-top: 18px; }

.track {
  height: 8px;
  border-radius: 99px;
  background: rgba(20, 70, 141, 0.12);
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--yellow);
  animation: slide 1.2s ease-in-out infinite;
}

.wait p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.alert {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4f4;
  color: #8d1d14;
  font-weight: 700;
}

@media (min-width: 1100px) {
  .work {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 20px;
    align-items: start;
  }

  .saved {
    order: 0;
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: 28px;
  }

  .saved-card { flex-basis: auto; width: 100%; }
}

@media (max-width: 959px) {
  .sheet .actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 18px -18px 0;
    padding: 16px 18px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 26%);
  }

  .field .btn {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 2;
  }
}

@media (min-width: 720px) {
  .actions.choices { grid-template-columns: 1fr 1fr; }

  .choice {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 108px;
  }
}

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: minmax(380px, 440px) 1fr;
  }

  .brand {
    min-height: 100vh;
    min-height: 100dvh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 36px 28px;
  }

  .brand-logo {
    width: 100%;
    margin-inline: 0;
  }

  .brand-top,
  .brand-foot {
    width: 100%;
    margin-inline: 0;
  }

  .brand-copy { display: block; margin-top: 28px; }

  .brand-kicker {
    margin: 0 0 8px;
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .brand-copy h1 {
    margin: 0;
    font-size: 40px;
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  .brand-lead {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
  }

  .flow {
    align-items: flex-start;
    padding: 48px 56px 64px;
  }

  .sheet { padding: 28px 28px 22px; }
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

@keyframes slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .track span { animation: none; width: 100%; }
}
