/* Melo guided helper widget */
#melo-widget-root {
  --melo-paper: #fffaf1;
  --melo-ivory: #fbf7ef;
  --melo-panel: #f3eadc;
  --melo-line: rgba(40, 28, 18, .14);
  --melo-line-strong: rgba(40, 28, 18, .24);
  --melo-ink: #1a120c;
  --melo-body: #33251a;
  --melo-muted: #725b45;
  --melo-gold: #a8793e;
  --melo-gold-soft: rgba(168, 121, 62, .13);
  --melo-shadow: 0 24px 70px rgba(30, 20, 12, .18), 0 8px 22px rgba(30, 20, 12, .1);
  --melo-soft-shadow: 0 12px 30px rgba(30, 20, 12, .15);
  --melo-serif: "Cormorant Garamond", Georgia, serif;
  --melo-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--melo-body);
  font-family: var(--melo-sans);
  line-height: 1.45;
  position: relative;
  z-index: 2147483000;
}

#melo-widget-root *,
#melo-widget-root *::before,
#melo-widget-root *::after {
  box-sizing: border-box;
}

#melo-widget-root button,
#melo-widget-root a {
  font: inherit;
}

#melo-widget-root button:focus-visible,
#melo-widget-root a:focus-visible {
  outline: 3px solid rgba(168, 121, 62, .3);
  outline-offset: 3px;
}

.melo-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147483001;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px 10px 12px;
  border: 1px solid rgba(168, 121, 62, .5);
  border-radius: 999px;
  background: #17100a;
  color: #fffaf1;
  box-shadow: var(--melo-soft-shadow);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.melo-launcher:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 173, 101, .85);
  box-shadow: 0 16px 34px rgba(30, 20, 12, .18);
}

.melo-launcher-icon,
.melo-brand-icon,
.melo-message-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #050403;
}

.melo-launcher-icon {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 250, 241, .14);
}

.melo-launcher-icon img,
.melo-brand-icon img,
.melo-message-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.melo-launcher-text {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.melo-shell {
  position: fixed;
  right: clamp(18px, 4vw, 44px);
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 74px);
  z-index: 2147483002;
  width: min(600px, calc(100vw - 36px));
  max-height: min(80vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(40, 28, 18, .13);
  border-radius: 26px;
  background: linear-gradient(180deg, #fffdf8 0%, var(--melo-ivory) 100%);
  box-shadow: var(--melo-shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

#melo-widget-root.is-open .melo-shell {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

#melo-widget-root.is-open .melo-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}


@media (min-width: 761px) {
  #melo-widget-root.is-creator-flow:not(.is-open) .melo-launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
}

.melo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--melo-line);
  background: rgba(255, 252, 247, .92);
}

.melo-title-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.melo-brand-icon {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  box-shadow: 0 5px 16px rgba(30, 20, 12, .16);
}

.melo-title {
  margin: 0;
  color: var(--melo-ink);
  font-family: var(--melo-serif);
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: 0;
}

.melo-kicker {
  margin-top: 5px;
  color: var(--melo-gold);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .24em;
  line-height: 1.15;
  text-transform: uppercase;
}

.melo-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.melo-icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--melo-ink);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.melo-icon-button:hover {
  background: rgba(168, 121, 62, .1);
  color: var(--melo-gold);
}

.melo-icon-button svg,
.melo-option-icon svg,
.melo-cta svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.melo-body {
  min-height: 0;
  overflow-y: auto;
  padding: 26px 28px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 121, 62, .38) transparent;
}

.melo-body::-webkit-scrollbar {
  width: 10px;
}

.melo-body::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(168, 121, 62, .35);
  background-clip: content-box;
}

.melo-message-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.melo-message-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(168, 121, 62, .2);
  border-radius: 50%;
  background: #fffaf1;
  padding: 5px;
}

.melo-message-card {
  width: fit-content;
  max-width: 100%;
  padding: 17px 20px;
  border: 1px solid rgba(168, 121, 62, .2);
  border-radius: 16px;
  background: rgba(255, 250, 241, .76);
  color: var(--melo-ink);
  box-shadow: 0 8px 22px rgba(30, 20, 12, .04);
}

.melo-message-card p {
  margin: 0;
  font-family: var(--melo-serif);
  font-size: clamp(1.35rem, 3vw, 1.72rem);
  font-weight: 400;
  line-height: 1.24;
}

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

.melo-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.melo-option {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(168, 121, 62, .21);
  border-radius: 13px;
  background: rgba(255, 252, 247, .78);
  color: var(--melo-body);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.melo-option:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 121, 62, .45);
  background: #fffaf1;
  box-shadow: 0 10px 22px rgba(30, 20, 12, .055);
  color: var(--melo-ink);
}

.melo-option-icon {
  width: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--melo-gold);
}

.melo-option-label {
  min-width: 0;
  font-family: var(--melo-serif);
  font-size: clamp(1.18rem, 2.4vw, 1.43rem);
  line-height: 1.1;
}

.melo-search-panel {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--melo-line);
}

.melo-search-label {
  color: var(--melo-gold);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.melo-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.melo-search-input {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(168, 121, 62, .24);
  border-radius: 12px;
  background: rgba(255, 252, 247, .78);
  color: var(--melo-ink);
  font: inherit;
  font-size: .96rem;
  outline: 0;
  padding: 0 14px;
}

.melo-search-input::placeholder {
  color: rgba(51, 37, 26, .48);
}

.melo-search-input:focus {
  border-color: rgba(168, 121, 62, .58);
  box-shadow: 0 0 0 3px rgba(168, 121, 62, .12);
}

.melo-search-submit {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(26, 18, 12, .88);
  border-radius: 999px;
  background: #17100a;
  color: #fffaf1;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  padding: 0 16px;
  text-transform: uppercase;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.melo-search-submit:hover {
  transform: translateY(-1px);
  border-color: var(--melo-gold);
  background: var(--melo-gold);
}

.melo-card-list {
  display: grid;
  gap: 12px;
}

.melo-idea-card,
.melo-search-card,
.melo-recommendation {
  padding: 17px 18px;
  border: 1px solid rgba(168, 121, 62, .19);
  border-radius: 15px;
  background: rgba(255, 252, 247, .72);
  color: var(--melo-body);
}

.melo-idea-card strong,
.melo-search-card strong,
.melo-recommendation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--melo-ink);
  font-family: var(--melo-serif);
  font-size: 1.38rem;
  font-weight: 500;
  line-height: 1.1;
}

.melo-idea-card p,
.melo-search-card p,
.melo-recommendation p {
  margin: 0;
  color: var(--melo-muted);
  font-size: .95rem;
  line-height: 1.55;
}

.melo-search-card .melo-actions {
  margin-top: 14px;
}

.melo-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 26px 0 22px;
  color: var(--melo-gold);
}

.melo-divider::before,
.melo-divider::after {
  content: "";
  height: 1px;
  background: var(--melo-line);
}

.melo-divider svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.melo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.melo-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 17px;
  border: 1px solid rgba(26, 18, 12, .88);
  border-radius: 999px;
  background: #17100a;
  color: #fffaf1;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.melo-cta:hover {
  transform: translateY(-1px);
  border-color: var(--melo-gold);
  background: var(--melo-gold);
  color: #fff;
}

.melo-cta.is-secondary {
  border-color: rgba(168, 121, 62, .28);
  background: rgba(255, 252, 247, .72);
  color: var(--melo-ink);
}

.melo-cta.is-secondary:hover {
  background: #fffaf1;
  color: var(--melo-gold);
}

.melo-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 76px;
  padding: 15px 24px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--melo-line);
  background: rgba(255, 252, 247, .93);
}

.melo-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(168, 121, 62, .3);
  border-radius: 999px;
  background: rgba(255, 250, 241, .78);
  color: var(--melo-ink);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.melo-back[hidden] {
  display: none !important;
}

.melo-back:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 121, 62, .58);
  background: #fffaf1;
  color: var(--melo-gold);
}

.melo-back svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.melo-footer-note {
  margin-left: auto;
  color: var(--melo-body);
  font-family: var(--melo-serif);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.1;
  text-align: right;
}

.melo-contact-open {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid rgba(168, 121, 62, .3);
  border-radius: 999px;
  background: rgba(255, 250, 241, .78);
  color: var(--melo-ink);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.melo-contact-open:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 121, 62, .58);
  background: #17100a;
  color: #fffaf1;
}

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

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

.melo-contact-field {
  display: grid;
  gap: 7px;
}

.melo-contact-field label {
  color: var(--melo-muted);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.melo-contact-field label span {
  color: rgba(114, 91, 69, .72);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: none;
}

.melo-contact-field input,
.melo-contact-field select,
.melo-contact-field textarea {
  width: 100%;
  border: 1.5px solid rgba(40, 28, 18, .18);
  border-radius: 12px;
  background: rgba(255, 250, 241, .74);
  color: var(--melo-ink);
  font: inherit;
  font-size: .92rem;
  line-height: 1.35;
  outline: none;
  padding: 12px 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.melo-contact-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--melo-gold) 50%), linear-gradient(135deg, var(--melo-gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.melo-contact-field textarea {
  min-height: 116px;
  resize: vertical;
}

.melo-contact-field input:focus,
.melo-contact-field select:focus,
.melo-contact-field textarea:focus {
  border-color: rgba(168, 121, 62, .72);
  background: #fffaf1;
  box-shadow: 0 0 0 4px rgba(168, 121, 62, .12);
}

.melo-contact-field.is-invalid input,
.melo-contact-field.is-invalid select,
.melo-contact-field.is-invalid textarea {
  border-color: #7f2835;
}

.melo-contact-error {
  display: none;
  color: #7f2835;
  font-size: .72rem;
  line-height: 1.35;
}

.melo-contact-field.is-invalid .melo-contact-error {
  display: block;
}

.melo-contact-privacy {
  margin: 0;
  color: var(--melo-muted);
  font-size: .76rem;
  line-height: 1.55;
}

.melo-contact-privacy a {
  color: var(--melo-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.melo-contact-submit {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #17100a;
  color: #fffaf1;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.melo-contact-submit:hover {
  transform: translateY(-1px);
  background: var(--melo-gold);
  box-shadow: var(--melo-soft-shadow);
}

.melo-contact-submit:disabled {
  opacity: .62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.melo-contact-message {
  display: none;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: .8rem;
  line-height: 1.5;
}

.melo-contact-message.is-showing {
  display: block;
}

.melo-contact-message.is-error {
  border: 1px solid rgba(127, 40, 53, .25);
  background: #fff6f6;
  color: #7f2835;
}

.melo-contact-thanks {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(168, 121, 62, .2);
  border-radius: 18px;
  background: rgba(255, 250, 241, .72);
  text-align: center;
}

.melo-contact-kicker {
  margin: 0;
  color: var(--melo-gold);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.melo-contact-thanks h3 {
  margin: 0;
  color: var(--melo-ink);
  font-family: var(--melo-serif);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 400;
  line-height: 1.08;
}

.melo-contact-thanks p {
  margin: 0;
  color: var(--melo-body);
  font-size: .92rem;
  line-height: 1.55;
}

.melo-screen {
  animation: meloFadeUp .22s ease both;
}

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

@media (prefers-reduced-motion: reduce) {
  .melo-shell,
  .melo-launcher,
  .melo-option,
  .melo-cta,
  .melo-screen {
    animation: none;
    transition: none;
  }
}

@media (max-width: 720px) {
  body.mobile-menu-open #melo-widget-root .melo-launcher,
  #melo-widget-root.mobile-gated:not(.mobile-ready):not(.is-open) .melo-launcher {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  body.sample-player-active.mobile-menu-open #melo-widget-root .melo-launcher {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .melo-launcher {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(.85rem, calc(env(safe-area-inset-bottom) + .85rem));
    min-height: 44px;
    padding: 8px 14px 8px 9px;
  }

  .melo-launcher-icon {
    width: 28px;
    height: 28px;
  }

  .melo-launcher-text {
    font-size: .7rem;
  }

  .melo-shell {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(100vh - 14px);
    max-height: min(calc(100vh - 14px), calc(100dvh - 14px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .melo-header {
    padding: 18px 18px 15px;
  }

  .melo-brand-icon {
    width: 44px;
    height: 44px;
  }

  .melo-header-actions {
    gap: 2px;
  }

  .melo-icon-button {
    width: 38px;
    height: 38px;
  }

  .melo-body {
    padding: 20px 16px 22px;
  }

  .melo-grid,
  .melo-grid.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .melo-option {
    min-height: 66px;
    gap: 10px;
    padding: 13px 12px;
  }

  .melo-option-icon {
    width: 24px;
    min-width: 24px;
  }

  .melo-option-label {
    font-size: 1.15rem;
  }

  .melo-footer {
    padding: 13px 16px calc(13px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .melo-grid,
  .melo-grid.is-three {
    grid-template-columns: 1fr;
  }

  .melo-message-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .melo-message-icon {
    width: 34px;
    height: 34px;
    padding: 4px;
  }

  .melo-message-card {
    padding: 14px 16px;
  }

  .melo-actions {
    flex-direction: column;
  }

  .melo-search-row {
    grid-template-columns: 1fr;
  }

  .melo-cta {
    width: 100%;
  }

  .melo-footer-note {
    display: none;
  }

  .melo-contact-open {
    min-height: 40px;
    padding: 9px 14px;
    font-size: .88rem;
    letter-spacing: 0;
  }

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

  .melo-contact-form {
    gap: 12px;
    margin-top: 14px;
  }

  .melo-contact-field input,
  .melo-contact-field select,
  .melo-contact-field textarea {
    font-size: .88rem;
    padding: 11px 12px;
  }

  .melo-contact-field textarea {
    min-height: 104px;
  }
}


/* Compact premium Melo panel refinement */
.melo-shell {
  width: min(560px, calc(100vw - 36px));
  height: min(600px, calc(100vh - 36px));
  max-height: none;
  grid-template-rows: 84px minmax(0, 1fr) 76px;
  border-radius: 22px;
}

.melo-header {
  min-height: 84px;
  padding: 18px 22px;
}

.melo-title-wrap {
  gap: 12px;
}

.melo-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(30, 20, 12, .13);
}

.melo-title {
  font-size: 2.25rem;
  line-height: .92;
}

.melo-kicker {
  margin-top: 3px;
  font-size: .66rem;
  letter-spacing: .18em;
}

.melo-icon-button {
  width: 34px;
  height: 34px;
  color: rgba(26, 18, 12, .72);
}

.melo-icon-button svg,
.melo-option-icon svg,
.melo-cta svg {
  width: 18px;
  height: 18px;
}

.melo-body {
  padding: 20px 22px;
}

.melo-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: meloFade .2s ease both;
}

.melo-prompt {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 2px 4px;
}

.melo-prompt h3 {
  margin: 0;
  color: var(--melo-ink);
  font-family: var(--melo-serif);
  font-size: 1.95rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.06;
}

.melo-prompt p {
  margin: 0;
  color: var(--melo-muted);
  font-size: .92rem;
  line-height: 1.35;
}

.melo-message-row {
  display: block;
  margin-bottom: 0;
}

.melo-message-icon {
  display: none;
}

.melo-message-card {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.melo-message-card p {
  font-size: 1.95rem;
  line-height: 1.06;
}

.melo-grid,
.melo-grid.is-three {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.melo-option {
  height: 72px;
  min-height: 72px;
  gap: 11px;
  padding: 14px 15px;
  border-radius: 15px;
  box-shadow: none;
}

.melo-option:hover {
  box-shadow: none;
}

.melo-option-icon {
  width: 22px;
  min-width: 22px;
}

.melo-option-label {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.13rem;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.melo-search-panel {
  margin-top: auto;
  padding-top: 14px;
  gap: 8px;
}

.melo-search-input,
.melo-search-submit {
  min-height: 42px;
}

.melo-card-list {
  gap: 10px;
}

.melo-idea-card,
.melo-search-card,
.melo-recommendation {
  padding: 14px 15px;
  border-radius: 14px;
}

.melo-idea-card strong,
.melo-search-card strong,
.melo-recommendation strong {
  margin-bottom: 5px;
  font-size: 1.22rem;
}

.melo-idea-card p,
.melo-search-card p,
.melo-recommendation p {
  font-size: .9rem;
  line-height: 1.45;
}

.melo-final-card {
  margin-top: 4px;
}

.melo-actions {
  margin-top: 4px;
  gap: 8px;
}

.melo-cta {
  min-height: 42px;
  padding: 10px 15px;
  font-size: .68rem;
}

.melo-footer {
  min-height: 76px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}

.melo-back {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .88rem;
}

.melo-footer-note {
  font-size: .98rem;
}

@keyframes meloFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 720px) {
  .melo-shell {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    height: min(76vh, calc(100dvh - 24px));
    max-height: none;
    grid-template-rows: 78px minmax(0, 1fr) 72px;
    border: 1px solid rgba(40, 28, 18, .13);
    border-radius: 22px;
  }

  .melo-header {
    min-height: 78px;
    padding: 16px 16px;
  }

  .melo-brand-icon {
    width: 34px;
    height: 34px;
  }

  .melo-title {
    font-size: 2rem;
  }

  .melo-kicker {
    font-size: .6rem;
    letter-spacing: .16em;
  }

  .melo-body {
    padding: 16px 14px;
  }

  .melo-prompt {
    min-height: 66px;
  }

  .melo-prompt h3,
  .melo-message-card p {
    font-size: 1.55rem;
    line-height: 1.08;
  }

  .melo-prompt p {
    font-size: .86rem;
  }

  .melo-option {
    height: 66px;
    min-height: 66px;
    padding: 12px;
    border-radius: 14px;
  }

  .melo-option-label {
    font-size: 1.02rem;
  }

  .melo-footer {
    min-height: 72px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .melo-grid,
  .melo-grid.is-three {
    grid-template-columns: 1fr;
  }
}


/* Melo compact fit tuning */
.melo-shell {
  height: min(620px, calc(100vh - 36px));
}

@media (max-width: 720px) {
  .melo-shell {
    height: min(76vh, calc(100dvh - 24px));
  }
}

@media (max-width: 390px) {
  .melo-grid,
  .melo-grid.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .melo-grid,
  .melo-grid.is-three {
    grid-template-columns: 1fr;
  }
}


/* Melo prompt spacing trim */
.melo-prompt {
  min-height: 72px;
}

@media (max-width: 720px) {
  .melo-prompt {
    min-height: 64px;
  }
}


/* Melo compact content fit + selectable ideas */
.melo-body {
  overflow: hidden;
  padding: 16px 20px;
}

.melo-screen {
  gap: 10px;
}

.melo-prompt {
  min-height: 50px;
  gap: 2px;
  padding-bottom: 0;
}

.melo-prompt h3,
.melo-message-card p {
  font-size: 1.56rem;
  line-height: 1.02;
}

.melo-prompt p {
  font-size: .82rem;
  line-height: 1.22;
}

.melo-grid,
.melo-grid.is-three {
  gap: 8px;
}

.melo-option {
  height: 58px;
  min-height: 58px;
  padding: 10px 12px;
}

.melo-option-label {
  font-size: 1rem;
  line-height: 1.05;
}

.melo-card-list {
  gap: 8px;
}

.melo-screen.is-ideas-result {
  min-height: 100%;
}

.melo-idea-carousel {
  display: grid;
  gap: 12px;
}

.melo-idea-slide {
  min-height: 150px;
  display: grid;
  align-content: start;
}

.melo-idea-slide strong {
  font-size: 1.28rem;
}

.melo-idea-slide p {
  font-size: .92rem;
  line-height: 1.42;
}

.melo-idea-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
}

.melo-idea-arrow {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(168, 121, 62, .34);
  border-radius: 999px;
  background: rgba(255, 252, 247, .76);
  color: var(--melo-ink);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.melo-idea-arrow:hover {
  border-color: rgba(168, 121, 62, .72);
  background: rgba(168, 121, 62, .1);
  transform: translateY(-1px);
}

.melo-idea-arrow svg {
  width: 18px;
  height: 18px;
}

.melo-idea-count {
  color: var(--melo-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}

.melo-screen.is-ideas-result .melo-actions {
  margin-top: auto;
  padding-top: 10px;
}

.melo-screen.is-ideas-result .melo-cta {
  width: 100%;
}

.melo-idea-card,
.melo-search-card,
.melo-recommendation {
  padding: 11px 13px;
  border-radius: 13px;
}

button.melo-idea-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

button.melo-idea-card.is-selected {
  border-color: rgba(168, 121, 62, .65);
  background: rgba(168, 121, 62, .1);
  box-shadow: inset 0 0 0 1px rgba(168, 121, 62, .2);
}

.melo-idea-card strong,
.melo-search-card strong,
.melo-recommendation strong {
  margin-bottom: 3px;
  font-size: 1.04rem;
  line-height: 1.02;
}

.melo-idea-card p,
.melo-search-card p,
.melo-recommendation p {
  font-size: .8rem;
  line-height: 1.28;
}

.melo-idea-slide.is-selected {
  border-color: rgba(168, 121, 62, .65);
  background: rgba(168, 121, 62, .1);
  box-shadow: inset 0 0 0 1px rgba(168, 121, 62, .2);
}

.melo-idea-slide strong {
  font-size: 1.28rem;
  line-height: 1.08;
}

.melo-idea-slide p {
  font-size: .92rem;
  line-height: 1.42;
}

.melo-actions {
  margin-top: auto;
}

.melo-price-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.melo-price-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 128px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(168, 121, 62, .22);
  border-radius: 14px;
  background: rgba(255, 252, 247, .74);
  color: var(--melo-ink);
  text-decoration: none;
}

.melo-price-card.is-popular {
  border-color: rgba(168, 121, 62, .7);
  background: linear-gradient(180deg, rgba(168, 121, 62, .18), rgba(255, 250, 241, .92));
  box-shadow: inset 0 0 0 1px rgba(168, 121, 62, .22);
}

.melo-price-card span {
  width: fit-content;
  margin-bottom: 3px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #17100a;
  color: #fffaf1;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.melo-price-card strong {
  font-family: var(--melo-serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.02;
}

.melo-price-card em {
  color: var(--melo-gold);
  font-style: normal;
  font-size: 1rem;
  font-weight: 700;
}

.melo-price-card small {
  color: var(--melo-muted);
  font-size: .72rem;
  line-height: 1.18;
}

.melo-upgrade-note {
  padding: 10px 12px;
  border: 1px solid rgba(168, 121, 62, .2);
  border-radius: 13px;
  background: rgba(168, 121, 62, .08);
}

.melo-upgrade-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--melo-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.melo-upgrade-note p {
  margin: 0;
  color: var(--melo-muted);
  font-size: .78rem;
  line-height: 1.25;
}

@media (max-width: 720px) {
  .melo-body {
    padding: 12px;
  }

  .melo-prompt {
    min-height: 44px;
  }

  .melo-prompt h3,
  .melo-message-card p {
    font-size: 1.3rem;
  }

  .melo-prompt p {
    font-size: .76rem;
  }

  .melo-option {
    height: 52px;
    min-height: 52px;
    padding: 9px 10px;
  }

  .melo-option-label {
    font-size: .94rem;
  }

  .melo-idea-card,
  .melo-search-card,
  .melo-recommendation {
    padding: 9px 10px;
  }

  .melo-idea-card strong,
  .melo-search-card strong,
  .melo-recommendation strong {
    font-size: .96rem;
  }

  .melo-idea-card p,
  .melo-search-card p,
  .melo-recommendation p {
    font-size: .74rem;
    line-height: 1.22;
  }

  .melo-price-mini {
    gap: 6px;
  }

  .melo-price-card {
    min-height: 116px;
    padding: 12px 8px 10px;
  }

  .melo-price-card strong {
    font-size: .92rem;
  }

  .melo-price-card em {
    font-size: .88rem;
  }

  .melo-price-card small {
    font-size: .64rem;
  }

  .melo-upgrade-note {
    padding: 8px 10px;
  }

  .melo-upgrade-note p {
    font-size: .7rem;
  }
}

#melo-widget-root.is-contact-screen .melo-body {
  overflow-y: auto;
}

#melo-widget-root.is-contact-screen .melo-screen {
  min-height: auto;
}

#melo-widget-root.is-contact-screen .melo-actions {
  margin-top: 10px;
}

@media (max-width: 720px) {
  #melo-widget-root.is-contact-screen .melo-shell {
    height: min(82vh, calc(100dvh - 24px));
  }
}


/* Melo button typography consistency */
#melo-widget-root .melo-option,
#melo-widget-root .melo-search-submit,
#melo-widget-root .melo-cta,
#melo-widget-root .melo-back,
#melo-widget-root .melo-contact-open,
#melo-widget-root .melo-contact-submit {
  font-family: var(--melo-sans) !important;
  font-size: .88rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

#melo-widget-root .melo-option {
  height: auto !important;
  min-height: 58px !important;
  align-items: center !important;
  padding: 10px 12px !important;
}

#melo-widget-root .melo-option-label {
  display: block !important;
  overflow: visible !important;
  color: inherit;
  font-family: var(--melo-sans) !important;
  font-size: .88rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.22 !important;
  text-transform: none !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
}

#melo-widget-root .melo-search-submit,
#melo-widget-root .melo-cta,
#melo-widget-root .melo-contact-submit {
  padding-inline: 18px !important;
}

#melo-widget-root .melo-cta svg {
  width: 17px;
  height: 17px;
}

#melo-widget-root .melo-icon-button[data-melo-close] svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 720px) {
  #melo-widget-root .melo-option {
    min-height: 54px !important;
    padding: 9px 10px !important;
  }

  #melo-widget-root .melo-option-label,
  #melo-widget-root .melo-option,
  #melo-widget-root .melo-search-submit,
  #melo-widget-root .melo-cta,
  #melo-widget-root .melo-back,
  #melo-widget-root .melo-contact-open,
  #melo-widget-root .melo-contact-submit {
    font-size: .86rem !important;
  }
}
