:root {
  /* 99chat */
  --accent-600: #ff7a00;
  --accent-500: #ff8f26;
  --accent-400: #ffa64d;
  --brand-950: #000000;
  --brand-900: #111111;
  --brand-800: #1a1a1a;
  --brand-700: #262626;
  --brand-600: #333333;
  --surface-muted: #f4f4f4;

  /* Google-like structure */
  --line: #e6e6e6;
  --line-hover: #dadada;
  --surface: #ffffff;
  --btn-bg: #f4f4f4;
  --muted: #6b6b6b;
  --danger: #d93025;
  --ok: #188038;
  --radius-box: 24px;
  --shadow-box: 0 1px 6px rgba(0, 0, 0, 0.18);
  --shadow-box-focus: 0 2px 10px 1px rgba(255, 122, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.12);
  --font-ui: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--brand-800);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 50% 22%, rgba(255, 122, 0, 0.08), transparent 58%),
    radial-gradient(ellipse 40% 30% at 12% 85%, rgba(255, 166, 77, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(255, 122, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 0, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 65% 50% at 50% 38%, black, transparent 72%);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font: 600 0.75rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn:hover {
  color: var(--accent-600);
}

.lang-btn.is-active {
  background: var(--accent-600);
  color: #fff;
}

.ghost-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font: 500 0.8125rem/1 var(--font-ui);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.ghost-btn:hover,
.ghost-btn[aria-expanded="true"] {
  color: var(--accent-600);
  background: rgba(255, 122, 0, 0.08);
}

.stage {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5vh 0 2rem;
}

.hero {
  text-align: center;
  animation: rise 0.65s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  user-select: none;
}

.brand span {
  display: inline-block;
}

.brand-gap {
  width: 0.28em;
}

.c-orange { color: var(--accent-600); }
.c-orange-soft { color: var(--accent-500); }
.c-orange-light { color: var(--accent-400); }
.c-ink { color: var(--brand-900); }

.tagline {
  margin: 0.85rem 0 0;
  color: var(--accent-600);
  font-size: 0.98rem;
  font-weight: 500;
  animation: rise 0.65s var(--ease) 0.06s both;
}

.editor {
  position: relative;
  z-index: 2;
  margin-top: 1.75rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  box-shadow: none;
  overflow: hidden;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.3s var(--ease);
  animation: rise 0.7s var(--ease) 0.1s both;
}

.editor:hover {
  border-color: transparent;
  box-shadow: var(--shadow-box);
}

.editor:focus-within {
  border-color: transparent;
  box-shadow: var(--shadow-box-focus);
  transform: scale(1.008);
}

.editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem 0.15rem 1.15rem;
}

.editor-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-600);
}

.editor-bar-actions {
  display: flex;
  gap: 0.25rem;
}

.icon-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-600);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  color: var(--accent-600);
  background: rgba(255, 122, 0, 0.1);
}

#json-input {
  display: block;
  width: 100%;
  min-height: 420px;
  max-height: 62vh;
  margin: 0;
  padding: 0.55rem 1.25rem 2.9rem;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--accent-600);
  caret-color: var(--accent-600);
  font-family: "Cascadia Code", "Fira Code", "Consolas", ui-monospace, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}

#json-input::placeholder {
  color: #c4a88a;
  font-family: var(--font-ui);
  font-weight: 400;
}

.editor-tools {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  display: flex;
  gap: 0.4rem;
}

.tool-btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--brand-600);
  font: 500 0.75rem/1 var(--font-ui);
  padding: 0.48rem 0.7rem;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.tool-btn:hover {
  border-color: rgba(255, 122, 0, 0.25);
  color: var(--accent-600);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: rise 0.7s var(--ease) 0.16s both;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  font: 500 0.875rem/1 var(--font-ui);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent-600);
  color: #fff;
  border-color: var(--accent-600);
}

.btn.primary:hover {
  background: #e86e00;
  border-color: #e86e00;
  box-shadow: 0 1px 2px rgba(255, 122, 0, 0.35);
}

.btn.secondary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--brand-700);
}

.btn.secondary:hover:not(:disabled) {
  border-color: var(--line-hover);
  color: var(--accent-600);
}

.btn.donate {
  background: var(--accent-500);
  color: #fff;
  border-color: var(--accent-500);
  font-weight: 600;
}

.btn.donate:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
}

.status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.status.is-ok {
  color: var(--ok);
}

.status.is-error {
  color: var(--danger);
}

.status.is-visible {
  animation: status-in 0.35s var(--ease);
}

@keyframes status-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings {
  margin-top: 1.25rem;
  animation: rise 0.35s var(--ease);
}

.settings-inner {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.field {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  font-size: 0.8rem;
  color: var(--brand-600);
  font-weight: 500;
}

.field select {
  appearance: none;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333333' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
  color: var(--brand-800);
  font: 500 0.875rem/1.2 var(--font-ui);
  cursor: pointer;
}

.field select:focus {
  outline: 2px solid rgba(255, 122, 0, 0.35);
  outline-offset: 1px;
  border-color: var(--accent-600);
}

.settings-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.support {
  width: min(920px, calc(100% - 2rem));
  margin: 3.5rem auto 0;
  padding: 2rem 0 2rem;
  border-top: 1px solid #ebebeb;
  text-align: center;
}

.support-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-900);
}

.support-copy p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pay-methods {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.pay-card {
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.pay-card-head {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.pay-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pix-logo strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #32bcad;
  letter-spacing: 0.02em;
}

.pay-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pay-btn {
  width: 100%;
}

.pix-key-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-600);
}

.pix-key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.pix-key {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: 500 0.78rem/1.3 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--brand-800);
  background: #fffaf5;
}

.pix-feedback {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.8rem;
  color: var(--ok);
}

.ad-slot {
  margin-top: 1.75rem;
  min-height: 90px;
  display: grid;
  place-items: center;
}

.ad-placeholder {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  background: var(--surface-muted);
  padding: 1rem;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
  padding: 1.25rem 1rem 2rem;
  color: #8a8a8a;
  font-size: 0.8rem;
  background: var(--surface-muted);
}

.footer a {
  color: var(--brand-600);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-600);
}

.footer .dot {
  opacity: 0.5;
}

.seo-panel {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid #ebebeb;
  text-align: left;
  color: var(--brand-800);
}

.seo-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--brand-900);
}

.seo-panel > p {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 62ch;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.seo-grid article {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.seo-grid h3,
.seo-faq-heading {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-600);
}

.seo-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.seo-faq-heading {
  margin-bottom: 0.75rem;
}

.seo-faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.seo-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-800);
  list-style: none;
}

.seo-faq summary::-webkit-details-marker {
  display: none;
}

.seo-faq summary::before {
  content: "+";
  display: inline-block;
  width: 1rem;
  color: var(--accent-600);
  font-weight: 700;
}

.seo-faq details[open] summary::before {
  content: "–";
}

.seo-faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .seo-grid {
    grid-template-columns: 1fr;
  }
}

/* Popup expandido */
.expand-dialog {
  border: 0;
  padding: 0;
  width: min(1100px, calc(100% - 1.5rem));
  max-width: 1100px;
  height: min(88vh, 900px);
  max-height: 88vh;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.expand-dialog::backdrop {
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(3px);
}

.expand-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
}

.expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.expand-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-600);
}

.expand-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#json-expand {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: 0;
  resize: none;
  background: #fffaf5;
  color: var(--accent-600);
  caret-color: var(--accent-600);
  font-family: "Cascadia Code", "Fira Code", "Consolas", ui-monospace, monospace;
  font-size: 0.98rem;
  line-height: 1.65;
  outline: none;
}

.expand-hint {
  margin: 0;
  padding: 0.65rem 1.15rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface-muted);
}

@media (max-width: 720px) {
  .stage {
    padding-top: 3vh;
    width: min(100% - 1.25rem, 920px);
  }

  .brand {
    font-size: clamp(2.3rem, 12vw, 3.2rem);
  }

  .editor:focus-within {
    transform: none;
  }

  #json-input {
    min-height: 320px;
    font-size: 0.88rem;
  }

  .expand-dialog {
    width: calc(100% - 0.75rem);
    height: 92vh;
    max-height: 92vh;
    border-radius: 14px;
  }

  .expand-header {
    flex-wrap: wrap;
  }

  .actions {
    gap: 0.55rem;
  }

  .btn {
    min-width: 7.5rem;
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .pix-key-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
