:root {
  --bg: #f5efe6;
  --ink: #1f2326;
  --muted: #5f676d;
  --card: #fffdfa;
  --line: #e6d8c6;
  --accent: #0d8f74;
  --accent-2: #f16f2d;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, #f7d8b6 0%, transparent 25%),
    radial-gradient(circle at 88% 16%, #b3e8dd 0%, transparent 24%),
    linear-gradient(180deg, #fef9f2 0%, #f6ecde 100%);
  min-height: 100vh;
  padding-bottom: 110px;
}

body.has-modal-open {
  overflow: hidden;
}

.page {
  width: min(1100px, 92vw);
  margin: 28px auto 50px;
  display: grid;
  gap: 18px;
}

.hero {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 10px 28px rgba(60, 35, 7, 0.08);
  animation: rise 500ms ease-out;
}

.kicker {
  margin: 0;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 8px 0 6px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-help-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-help-hint {
  color: #6b5c49;
  font-size: 0.88rem;
  line-height: 1.35;
}

.help-btn {
  padding: 9px 14px;
  border-radius: 999px;
}

.auth-bar {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}

.auth-info {
  display: grid;
  gap: 2px;
}

.auth-label {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d777f;
  font-weight: 700;
}

#authStatus {
  font-weight: 600;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#googleLoginMount {
  min-width: 240px;
}

.panel {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(60, 35, 7, 0.08);
  animation: rise 580ms ease-out;
}

.editorial-panel {
  display: grid;
  gap: 14px;
}

.editorial-heading {
  display: grid;
  gap: 8px;
}

.editorial-heading h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
}

.editorial-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.editorial-card {
  border: 1px solid #e4d6c4;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff6ea 100%);
  display: grid;
  gap: 6px;
}

.editorial-card strong {
  font-family: "Sora", sans-serif;
  font-size: 0.98rem;
}

.editorial-card p {
  margin: 0;
  color: #556068;
  line-height: 1.5;
  font-size: 0.92rem;
}

.form {
  display: grid;
  gap: 12px;
}

.dropzone-main {
  border: 2px dashed #d1b895;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fffcf7 0%, #fff4e7 100%);
  cursor: pointer;
}

.dropzone-main p {
  margin: 0;
  font-size: 1.02rem;
}

.dropzone-main small {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
}

.dropzone-main:hover,
.dropzone-main:focus-visible,
.dropzone-main.active {
  outline: none;
  border-color: var(--accent);
  background: linear-gradient(180deg, #f5fff9 0%, #eafff8 100%);
}

.dropzone-main.locked {
  cursor: not-allowed;
  opacity: 0.72;
  border-color: #ccb79c;
  background: linear-gradient(180deg, #f4efe8 0%, #efe5d8 100%);
}

.props-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.props-panel > summary {
  cursor: pointer;
  list-style: none;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.props-panel > summary::-webkit-details-marker {
  display: none;
}

.props-panel > summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
}

.props-panel[open] > summary::after {
  content: "-";
}

.props-panel .grid,
.props-panel .sample-picker {
  margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.93rem;
  color: #34404b;
}

.field-hint {
  color: #6a7279;
  font-size: 0.8rem;
  line-height: 1.35;
}

.sort-hint {
  grid-column: 1 / -1;
  margin-top: -6px;
}

input,
select,
button {
  font-family: inherit;
}

input,
select {
  border: 1px solid #c8c9c8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #ffffff;
}

.checkbox {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 25px;
}

.sample-picker {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.sample-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sample-top small {
  color: var(--muted);
}

.preview-box {
  position: relative;
  border: 1px dashed #cdb79b;
  border-radius: 12px;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fffefb 0%, #fff6e9 100%);
}

.preview-box img {
  max-width: 100%;
  max-height: 360px;
  display: none;
  cursor: crosshair;
}

.preview-box.has-image img {
  display: block;
}

#previewEmpty {
  position: absolute;
  text-align: center;
  color: var(--muted);
  padding: 0 12px;
}

.preview-box.has-image #previewEmpty {
  display: none;
}

#sampleMarker {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(241, 111, 45, 0.35);
  transform: translate(-50%, -50%);
  display: none;
  pointer-events: none;
}

.preview-box.has-marker #sampleMarker {
  display: block;
}

#sampleInfo {
  color: #4b545d;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(120deg, var(--accent), #0f6f8f);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
}

button:disabled {
  filter: grayscale(0.35);
  cursor: not-allowed;
}

.status {
  font-weight: 600;
  color: var(--muted);
  min-height: 24px;
}

.status.error {
  color: var(--danger);
}

.results {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.selection-tools {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.selection-tools button {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.selection-tools small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  animation: rise 380ms ease-out;
}

.card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.card .meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.thumb-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.thumb {
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  overflow: hidden;
  background: #fcfcfc;
  position: relative;
}

.thumb-rotate-controls {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  gap: 4px;
}

.thumb-rotate-btn {
  border: 0;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(31, 35, 38, 0.72);
  color: #fff;
  cursor: pointer;
}

.thumb-rotate-btn:hover {
  filter: none;
  transform: none;
  background: rgba(13, 143, 116, 0.88);
}

.thumb-media {
  transform-origin: center center;
  transition: transform 120ms ease;
}

.thumb-check {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 2px 4px;
}

.thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.thumb img.thumb-media {
  background: #fff;
}

.thumb a {
  display: block;
  padding: 7px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.8rem;
  word-break: break-all;
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 8px 0;
}

.quick-actions {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(1100px, calc(100vw - 16px));
  background: rgba(255, 253, 250, 0.96);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(43, 28, 10, 0.16);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.quick-actions button {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 143, 116, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.drop-overlay.active {
  display: flex;
}

.drop-overlay-card {
  border: 2px dashed #0d8f74;
  border-radius: 14px;
  background: #f6fff9;
  color: #125c4e;
  font-family: "Sora", sans-serif;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(24, 68, 59, 0.2);
}

.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 35, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
}

.processing-card {
  min-width: 240px;
  border-radius: 14px;
  background: #fffdf9;
  border: 1px solid #e4d3bf;
  box-shadow: 0 14px 30px rgba(25, 19, 12, 0.28);
  padding: 18px 20px;
  display: grid;
  place-items: center;
  gap: 10px;
}

.processing-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 4px solid #d6efe9;
  border-top-color: #0d8f74;
  animation: spin 0.8s linear infinite;
}

.processing-card p {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: #2f393d;
  font-size: 0.95rem;
}

button.ghost {
  background: #f0e8dc;
  color: #273039;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(31, 35, 38, 0.55);
  backdrop-filter: blur(4px);
}

.help-modal-card {
  width: min(960px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #d9c7af;
  background: #fffdf8;
  box-shadow: 0 24px 54px rgba(18, 11, 3, 0.32);
  padding: 18px;
}

.help-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.help-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.help-modal-header h2 {
  margin: 6px 0 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.help-close-btn {
  flex: 0 0 auto;
  padding: 9px 14px;
}

.help-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.help-copy,
.help-demo {
  border: 1px solid #e5d7c6;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.help-copy p {
  margin: 0;
  color: #44515a;
  line-height: 1.55;
}

.help-copy p + p,
.help-copy p + ol,
.help-copy ol + p {
  margin-top: 12px;
}

.help-steps {
  margin: 0;
  padding-left: 20px;
  color: #3c4852;
  display: grid;
  gap: 8px;
  line-height: 1.45;
}

.help-note {
  padding: 12px;
  border-radius: 12px;
  background: #fff6ec;
  border: 1px solid #f0d6b1;
}

.help-demo {
  display: grid;
  gap: 12px;
}

.demo-stage {
  border: 1px solid #eadcc9;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fffefa 0%, #fff8f0 100%);
}

.demo-label {
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.demo-sheet {
  position: relative;
  min-height: 210px;
  border-radius: 12px;
  border: 2px solid #d9c7af;
  background:
    radial-gradient(circle at 85% 15%, rgba(241, 111, 45, 0.12) 0, transparent 22%),
    linear-gradient(180deg, #fcfcf9 0%, #f4efe6 100%);
  overflow: hidden;
}

.demo-item {
  position: absolute;
  display: block;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f4858 0%, #7c98ab 100%);
  opacity: 0.92;
}

.demo-item.large {
  left: 16%;
  top: 14%;
  width: 60%;
  height: 26%;
}

.demo-item.small.a {
  left: 15%;
  top: 54%;
  width: 20%;
  height: 16%;
}

.demo-item.small.b {
  left: 42%;
  top: 56%;
  width: 22%;
  height: 14%;
}

.demo-item.small.c {
  left: 70%;
  top: 50%;
  width: 16%;
  height: 18%;
}

.demo-sample-point {
  position: absolute;
  right: 10%;
  bottom: 12%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(241, 111, 45, 0.2);
  border: 2px solid #fff;
}

.demo-stage small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.demo-middle {
  display: grid;
  gap: 10px;
}

.demo-arrow {
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(120deg, #eef8f5 0%, #fff6ed 100%);
  border: 1px dashed #b9d8cf;
  color: #35524a;
  line-height: 1.5;
}

.demo-outputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 170px;
}

.demo-crop {
  border-radius: 12px;
  border: 1px solid #cfb99b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(242, 233, 220, 0.92) 100%),
    linear-gradient(135deg, #0d8f74 0%, #f16f2d 100%);
  position: relative;
  overflow: hidden;
}

.demo-crop::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(13, 143, 116, 0.35);
}

.demo-crop.one::after,
.demo-crop.two::after,
.demo-crop.three::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 36%;
  height: 26%;
  border-radius: 999px;
  background: rgba(31, 35, 38, 0.8);
}

.demo-crop.two::after {
  top: 24%;
  left: 28%;
  right: 26%;
  height: 36%;
}

.demo-crop.three::after {
  top: 42%;
  left: 18%;
  right: 34%;
  height: 18%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 850px) {
  body {
    padding-bottom: 154px;
  }

  .hero {
    padding: 16px;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .hero-help-row {
    align-items: flex-start;
  }

  .help-modal-card {
    padding: 14px;
  }

  .help-modal-header {
    flex-direction: column;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .demo-outputs {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .demo-crop {
    min-height: 86px;
  }

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

  .checkbox {
    padding-top: 0;
  }

  .quick-actions {
    width: calc(100vw - 12px);
    left: 6px;
    transform: none;
    bottom: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .quick-actions button {
    font-size: 0.92rem;
    padding: 10px 10px;
  }

  .auth-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Footer ──────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 20px 0 8px;
  display: grid;
  gap: 6px;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-nav span {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Páginas internas (Sobre / Contato) ──────────────── */

.inner-page {
  padding-bottom: 40px;
}

.inner-header {
  padding: 6px 0;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.inner-article {
  display: grid;
  gap: 0;
  line-height: 1.6;
}

.inner-article h1 {
  margin: 6px 0 16px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.inner-article h2 {
  margin: 24px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.inner-article p {
  margin: 0 0 12px;
  color: #3c4852;
}

.inner-article ul,
.inner-article ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: #3c4852;
  display: grid;
  gap: 6px;
}

/* Contact form */

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.label-full {
  grid-column: 1 / -1;
}

.contact-form textarea {
  border: 1px solid #c8c9c8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  resize: vertical;
}

.contact-form-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.contact-note--ok {
  background: #eaf9f3;
  border: 1px solid #9de4c8;
  color: #12583f;
}

.contact-note--err {
  background: #fff3f2;
  border: 1px solid #f5c0bb;
  color: #8b1c15;
}

.contact-divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}

@media (min-width: 600px) {
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

