:root {
  --bg: #fff5fb;
  --card: #ffffff;
  --primary: #ff8ac1;
  --primary-dark: #ff5faa;
  --accent: #8bd9c7;
  --text-main: #2b2930;
  --text-soft: #7a7584;
  --border-soft: #f5d7e9;
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.06);
  --radius-big: 22px;
  --radius-med: 16px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "DynaPuff";
  src: url("DynaPuff-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;     /* intervalo do variable font */
  font-style: normal;
  font-display: swap;
}



body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.page {
  width: 100%;
  max-width: 480px;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "DynaPuff";
}
.logo img{
  width: 50px;
}


.logo-text-main {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.06em;
  /*text-transform: uppercase;*/
}

.tagline {
  font-size: 12px;

  color: var(--text-soft);
}

.subtitle {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.5;
}


#intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.btn-intro {
  align-self: flex-start;
  margin:auto;
  margin-top:1rem;
  width:60%;
}


main .card {
  display: none;
}

.another-wrapper {
  display: none;
}


.card-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.card {
  background: var(--card);
  border-radius: var(--radius-big);
  box-shadow: var(--shadow-soft);
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  border: 1px solid var(--border-soft);
}

.card-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plant-header-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.plant-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nickname {
  font-size: 20px;
  font-weight: 500;
  font-family: "DynaPuff";
  color: var(--primary-dark)
}

.species {
  font-family: "DynaPuff";
  font-weight:400;
  color: var(--text-soft);
  font-size: 0.8rem;
}


.image-zone {
  width: 100%;
}


.cartoon-wrapper {
  position: relative;
  padding: 10px;
  overflow: hidden;
  min-height: 300px;
  display: block;
 transition: opacity 0.2s ease;
}

/* quando está a preparar a nova suculenta */
.cartoon-wrapper.cartoon-hidden {
  opacity: 0;
}

/* todas as camadas ocupam exatamente a mesma área */
.cartoon-wrapper img {
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  object-fit: contain;
}




.pot-layer {
  z-index: 1;
  pointer-events: none;
}

.plant-layer {
  z-index: 2;
  pointer-events: none;
}

.accessory-overlay {
  z-index: 3;
  pointer-events: none;
}

.expression-overlay {
  z-index: 4;
  pointer-events: none;
}






.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.fee-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border-soft);
  font-size: 13px;
}

.fee-amount {
  font-weight: 500;
  font-family: "DynaPuff";
}

.fee-label {
  font-size: 11px;
  color: var(--text-soft);
}

.desc-text {
  font-size: 13px;
  line-height: 1;
  color: var(--text-main);
  white-space: pre-line; /* isto faz o \n virar quebra real */
}

.buttons-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 450;
  padding: 11px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  touch-action: manipulation;
  font-family: "DynaPuff";
}

.btn:active {
  transform: translateY(1px) scale(0.98);

}

.btn-primary {
  background: var(--primary);
  color: #fff;

}

.btn-primary:disabled {
  opacity: 0.7;
  box-shadow: none;
  cursor: default;
}

.btn:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  border: 1px dashed var(--primary);
  color: var(--text-main);
  color:#303030;
  font-weight: 100;
}

.btn-small {
  font-size: 14px;
  padding: 8px 12px;
}

.status-text {
  margin-top: 4px;
  min-height: 18px;
  font-size: 11px;
  color: var(--text-soft);
}

.status-loading::after {
  content: "⋯";
  animation: dots 1s infinite steps(3, end);
  display: inline-block;
  margin-left: 2px;
}

@keyframes dots {
  0% { content: "⋯"; }
  33% { content: "."; }
  66% { content: ".."; }
  100% { content: "⋯"; }
}

footer {
  font-size: 9px;
  color: var(--text-soft);
  text-align: center;
  margin:auto;
  position: absolute;
  bottom:0;
  padding-bottom: 1px;
  font-family: "DynaPuff";
}

/* Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 22, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 20;
}

.modal-hidden {
  display: none;
}

.modal {
  max-height: 100vh;

  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-big);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  border: 1px solid var(--border-soft);
}

.modal-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;

}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "DynaPuff";
  color: var(--primary);

}

#rules-modal-backdrop .modal-title {
  font-size: 1rem;
  font-weight: 400;
  font-family: "DynaPuff";
  color: var(--primary);

}


.modal-close-btn {
  border: none;
  background: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}

.modal-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

.modal-highlight {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
  margin-top: 4px;
}

.modal-plant-photo {
  width: 100%;
  max-width: 300px;
  /*border-radius: 16px;
  border: 2px solid #ffc3dd;*/
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-top: 8px;
  margin: auto;
}

.adoption-text {
  width: 100%;
  min-height: 80px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 8px 10px;
  font-size: 12px;
  resize: vertical;
  font-family: inherit;
  background: #fff;
}

.modal-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.copy-status {
  font-size: 11px;
  color: var(--text-soft);
  min-height: 16px;
}

.rules-button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  font-size: 11px;
  color: var(--text-soft);
  cursor: pointer;
}

.another-wrapper {
  margin-top: 10px;
  display: none;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.another-btn {
  width: 90%;
  /*max-width: 260px; */

}

.another-wrapper .status-text {
  text-align: center;
  font-size: 11px;
  color: var(--text-soft);
  min-height: 16px;
}

#natal{
  text-align: center;
  margin: auto;
}
#natal img {
  max-width: 165px;
  margin: auto;
  margin-bottom: 0;
}
#natal p{
  text-align: center;
  font-family: "DynaPuff";
  font-size: 1.5rem;
    margin-top: 0;
    color:red;
}


.share-btn {
  font-size: 11px;
  padding: 5px 20px;
  align-self: flex-start;
  opacity: 0.9;
  border: none;
  font-weight: 500;
  font-family: inherit;
  margin:0 auto;
}

/* Modal de partilha */
.share-modal .modal-inner {
  gap: 12px;
}

.share-card {
  position: relative;
  width: 100%;
  border-radius: 18px;
  padding: 12px;
  background: #fff5fb;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;

}

.share-card-logo {
  position: absolute;
  top: 8px;
  right: 8px;
}

.share-card-logo img {
  width: 55px;
  height: auto;
}

.share-cartoon-wrapper {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
}

/* reutiliza as mesmas classes de layers */
.share-cartoon-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.share-name {
  font-family: "DynaPuff", system-ui;
  font-size: 16px;
}

.share-species {
  font-size: 12px;
  color: var(--text-soft);
}

.share-text {
  font-size: 11px;
  margin-top: 4px;
}

.share-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}



@media (max-width: 640px) {
  .page {
    padding-top: 5px;
    gap: 5px;
  }


.cartoon-wrapper{
    min-height: 200px;
}




}
