/* Paleta: verde sálvia, off-white quente e grafite suave (mesma da landing page). */
:root {
  --ink: #2c2e29;
  --paper: #ffffff;
  --mist: #f5f3f0;
  --line: #e2ded7;
  --muted: #7d7f76;
  --sage: #8fa68b;
  --sage-deep: #5f7660;
  --sage-ink: #3f5141;
  --sage-light: #c3d1b5;

  /* Variáveis do tema: o painel (Configurações > Aparência) sobrescreve estas. */
  --on-primary: #ffffff;           /* texto sobre a cor principal (topo, seções) */
  --on-primary-rgb: 255, 255, 255;
  --on-accent: #ffffff;            /* texto sobre a cor de destaque (botões) */
  --on-accent-rgb: 255, 255, 255;
  --logo: #5f7660;                 /* cor da logo sobre fundo claro */
  --band-logo: #8d8f86;
  --text-soft: #4b4d46;
  --cream-rgb: 245, 243, 240;
  --dark-rgb: 50, 64, 52;
  --night-rgb: 24, 27, 23;
  --shadow-rgb: 40, 50, 35;
  --hero-a: #c3d1b5;
  --hero-b: #7a9771;
  --hero-c: #94ab8f;
  --hero-d: #86a083;
  --hero-gradient: radial-gradient(120% 90% at 20% 80%, var(--hero-a) 0%, transparent 55%), radial-gradient(80% 70% at 85% 15%, var(--hero-b) 0%, transparent 60%), linear-gradient(160deg, var(--hero-c), var(--hero-d));
  --blob-1: #d3dcc2;
  --blob-2: #6b8f4e;
  --blob-3: #7ea05d;
  --blob-4: #a9bb9b;
  --serif: "Playfair Display", Georgia, serif;
  --script: "Pinyon Script", cursive;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- Tipografia ---------- */
.serif { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; }
.h-xl { font-size: clamp(2.5rem, 6vw, 4rem); }
.h-lg { font-size: 2.5rem; }
.h-md { font-size: 1.9rem; }
.h-sm { font-size: 1.6rem; }
.label { display: block; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--sage-deep); }
.caps { font-size: 13px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.underline { text-decoration: underline; text-underline-offset: 4px; }
.link { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; text-underline-offset: 5px; }
.link:hover { text-decoration: underline; }

/* ---------- Espaçamentos e layout ---------- */
.wrap { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1280px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gap { gap: 24px; } .gap-sm { gap: 12px; } .gap-lg { gap: 28px; }
.wrap-row { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.mt-sm { margin-top: 8px; } .mt-md { margin-top: 24px; } .mt-xl { margin-top: 64px; }
.mb-md { margin-bottom: 24px; } .mb-lg { margin-bottom: 40px; } .mb-xl { margin-bottom: 56px; }
.w-full { width: 100%; }
.inline { display: inline; }
.border-top { border-top: 1px solid var(--line); }
@media (max-width: 639px) { .hide-sm { display: none !important; } }

/* ---------- Botões e campos ---------- */
.btn, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 500; transition: background .2s, color .2s; white-space: nowrap; }
.btn { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--on-accent); }
.btn:hover { background: var(--sage-ink); border-color: var(--sage-ink); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 8px 16px; }
.btn:disabled, .btn-ghost:disabled { opacity: .4; cursor: not-allowed; }
.field { display: block; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; color: var(--ink); outline: none; border-radius: 0; transition: border-color .2s; }
.field:focus { border-color: var(--sage-deep); }
.field::placeholder { color: #a3a3a3; }
textarea.field { resize: vertical; }
label small { display: block; margin-top: 8px; }
.error { border-left: 2px solid var(--ink); padding-left: 12px; font-size: 14px; }
.notice { border: 1px solid var(--ink); padding: 12px 16px; font-size: 14px; margin-bottom: 32px; }
.notice-error { background: #f3e7e3; border-color: #c9a59a; color: #6b3a2e; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.tabs button { padding: 12px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; transition: background .2s; }
.tabs button:hover { background: var(--mist); }
.tabs button.active { background: var(--sage-deep); color: var(--on-accent); }

/* ---------- Cabeçalho ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; line-height: 1; }
.logo svg { width: 36px; height: auto; flex-shrink: 0; color: var(--logo); }
@media (max-width: 480px) { .logo span { display: none; } }
.bar { border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.bar-fixed { position: fixed; inset: 0 0 auto 0; z-index: 40; background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- Landing page ---------- */
.hero { min-height: 100dvh; display: flex; align-items: flex-end; padding: 112px 0 64px; }
.hero-title { max-width: 900px; font-size: clamp(3rem, 9vw, 6.2rem); line-height: 1.02; }
.hero-foot { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: 32px; }
.hero-text { max-width: 440px; }
@media (min-width: 640px) { .hero-foot { flex-direction: row; align-items: flex-end; justify-content: space-between; } .hero { padding-bottom: 96px; } }
.section { padding: 96px 0; }
.split { display: grid; gap: 48px; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 2fr; } }
.lead { font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.3; }
.services { margin-top: 64px; display: grid; gap: 1px; background: var(--line); }
.services > div { background: var(--paper); padding: 24px 0; }
.services h3 { margin-bottom: 12px; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(3, 1fr); } .services > div { padding: 24px; } .services > div:first-child { padding-left: 0; } }
.dark { background: var(--ink); color: var(--paper); }
.dark .label { color: #a3a3a3; }
.steps { display: grid; gap: 48px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border-top: 1px solid #404040; padding-top: 24px; }
.step-n { font-size: 3rem; display: block; margin-bottom: 24px; }
.step p { color: #a3a3a3; margin-top: 12px; }
.cta-box { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; border: 1px solid var(--ink); padding: 32px; }
.cta-box .label { margin-bottom: 12px; }
@media (min-width: 640px) { .cta-box { flex-direction: row; align-items: center; justify-content: space-between; padding: 48px; } }
.contact-mail { display: block; font-size: clamp(1.7rem, 4.5vw, 3rem); word-break: break-word; }
.contact-mail:hover { font-style: italic; }
.footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 12px; color: var(--muted); }
.footer-inner { display: flex; flex-direction: column; gap: 8px; justify-content: space-between; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }

/* ---------- Páginas internas ---------- */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.center-page { flex: 1; min-height: calc(100dvh - 64px); display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.narrow { width: 100%; max-width: 380px; }
.narrow .h-lg { margin-bottom: 8px; }
.page-body { padding-top: 48px; padding-bottom: 64px; }
.page-title { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.page-title .label { margin-bottom: 12px; }
@media (min-width: 640px) { .page-title { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.empty { border: 1px dashed var(--line); padding: 64px 24px; text-align: center; }
.empty .muted { margin-top: 8px; }
.box { border: 1px solid var(--line); padding: 24px; flex-wrap: wrap; }
.box .label { margin-bottom: 6px; }
.admin-grid { display: grid; gap: 64px; }
@media (min-width: 1024px) { .admin-grid { grid-template-columns: 2fr 1fr; } }
.list { border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 12px; transition: background .2s; }
.list a:hover { background: var(--mist); }
.list a > span:first-child { min-width: 0; }
.list strong, .list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list strong { font-weight: 500; }
.list small { font-size: 14px; }
.admin-split { display: grid; gap: 48px; margin-top: 64px; padding-top: 48px; }
@media (min-width: 768px) { .admin-split { grid-template-columns: 1fr 1fr; } }
.config-block { display: grid; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .config-block { grid-template-columns: 1fr 2fr; } }

/* ---------- Upload ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 24px; border: 1px dashed #d4d4d4; text-align: center; transition: background .2s, border-color .2s; }
.dropzone.dragging { border-color: var(--ink); background: var(--mist); }
.queue { margin-top: 16px; }
.queue ul { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-size: 14px; }
.queue li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.queue .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .status { font-size: 12px; color: var(--muted); }
.queue .bar-track { grid-column: span 2; height: 1px; background: var(--line); }
.queue .bar-fill { display: block; height: 1px; width: 0; background: var(--ink); transition: width .2s; }
.queue .failed .bar-fill { background: #a3a3a3; }

/* ---------- Galeria ---------- */
.filters { display: flex; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.filters button { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid transparent; }
.filters button:hover, .filters button.active { color: var(--ink); }
.filters button.active { border-color: var(--ink); }
.grid { columns: 2; column-gap: 8px; }
@media (min-width: 640px) { .grid { column-gap: 12px; } }
@media (min-width: 768px) { .grid { columns: 3; } }
@media (min-width: 1280px) { .grid { columns: 4; } }
.tile { position: relative; break-inside: avoid; margin-bottom: 8px; }
@media (min-width: 640px) { .tile { margin-bottom: 12px; } }
.tile.is-hidden { display: none; }
.tile.removing { opacity: .4; pointer-events: none; }
.tile-open { position: relative; display: block; width: 100%; overflow: hidden; background: var(--mist); }
.tile-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .5s; }
.tile:hover .tile-open img { transform: scale(1.02); opacity: .92; }
.play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.play svg { box-sizing: content-box; padding: 18px 16px 18px 20px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); }
.tile-actions { position: absolute; right: 0; bottom: 0; display: flex; gap: 4px; padding: 8px; opacity: 0; transition: opacity .2s; }
.tile:hover .tile-actions, .tile:focus-within .tile-actions { opacity: 1; }
@media (hover: none) { .tile-actions { opacity: 1; } }
.tile-actions a, .tile-actions button { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; background: var(--paper); color: var(--ink); transition: background .2s, color .2s; }
.tile-actions a:hover, .tile-actions button:hover { background: var(--ink); color: var(--paper); }

/* ---------- Visualizador ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--ink); color: var(--paper); animation: fade .25s ease-out; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 16px; flex-shrink: 0; }
.lb-info { min-width: 0; font-size: 12px; }
.lb-info p:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-info p:last-child { color: #737373; }
.lb-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lb-download { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--paper); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.lb-download:hover { background: var(--paper); color: var(--ink); }
.lb-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.lb-btn:hover { background: #262626; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px 16px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; animation: fade .25s ease-out; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
@media (min-width: 640px) { .lb-stage { padding: 0 64px 16px; } .lb-top { padding: 0 24px; } }
@media (max-width: 639px) { .lb-nav, .lb-download span { display: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; background: var(--paper); color: var(--ink); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; pointer-events: none; }
.migrate { gap: 16px; }

/* ---------- Galeria do cliente (página) ---------- */
.gallery-body { background: var(--mist); }
.gallery-body .bar { background: var(--mist); border-color: transparent; }
.gallery-page { max-width: 1320px; margin: 0 auto; padding: 8px 12px calc(48px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .gallery-page { padding: 16px 24px 64px; } }
.react-gallery { min-height: 40vh; }

/* ---------- Imagens do site (painel) ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.thumbs figure { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--mist); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figcaption { position: absolute; inset: auto 6px 6px 6px; display: flex; justify-content: flex-end; gap: 4px; }
.thumbs button { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: 15px; line-height: 1; }
.thumbs button:hover { background: var(--ink); color: var(--paper); }
.uploader-sm .dropzone { padding: 20px; flex-direction: row; justify-content: space-between; text-align: left; border-radius: 12px; margin-top: 8px; }
.dropzone { border-radius: 16px; }
.box, .notice { border-radius: 12px; }
.tabs { border-radius: 999px; overflow: hidden; }

/* Login com o mesmo verde granulado do topo da landing page. */
.login-body { background: var(--mist); }
.login-split { min-height: 100dvh; display: grid; }
@media (min-width: 900px) { .login-split { grid-template-columns: 1fr 1fr; } }
.login-art { position: relative; display: none; overflow: hidden; background: var(--hero-gradient); color: var(--on-primary); }
@media (min-width: 900px) { .login-art { display: flex; align-items: center; justify-content: center; } }
.login-art::after { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.login-art p { position: relative; z-index: 1; text-align: center; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
.login-art .script { display: block; font-family: var(--script); font-size: calc(5.5rem * var(--script-scale, 1)); letter-spacing: 0; text-transform: none; line-height: 1; margin-bottom: 8px; }
.login-art svg { display: block; width: 120px; margin: 0 auto 28px; }
.login-panel { display: flex; flex-direction: column; padding: 0 16px; background: var(--mist); }
@media (min-width: 640px) { .login-panel { padding: 0 32px; } }

/* ---------- Entrega (painel) ---------- */
.delivery { display: grid; gap: 40px; margin-bottom: 56px; padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
@media (min-width: 900px) { .delivery { grid-template-columns: 1.15fr 1fr; gap: 56px; } }
.delivery-form { align-self: start; }
.preview-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; padding: 10px 16px; background: var(--sage-ink); color: var(--paper); font-size: 13px; }
.preview-bar a { text-decoration: underline; text-underline-offset: 3px; }

.pkg-edit { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px 20px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.pkg-edit legend { padding: 0 6px; }
.pkg-row { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; }

/* ---------- Política de Privacidade e Termos ---------- */
.legal-page, .legal-page .bar { background: var(--mist); }
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.legal .h-xl { margin: 12px 0 16px; }
.legal-intro { font-size: 1.1rem; color: var(--muted); margin-bottom: 40px; }
.legal-body h2 { margin: 40px 0 12px; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.legal-body p, .legal-body li { line-height: 1.8; color: var(--text-soft); }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 0; display: flex; flex-direction: column; gap: 8px; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before { content: "✦"; position: absolute; left: 0; font-size: 10px; top: .45em; color: var(--sage); }
.legal-body a { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer a:hover { text-decoration: underline; }
.login-legal { padding: 0 0 calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; color: var(--muted); }
.login-legal a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Configurações > Aparência ---------- */
#aparencia .theme-form, #aparencia .theme-preview { min-width: 0; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.preset { cursor: pointer; }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.preset:hover .preset-card { border-color: var(--sage); }
.preset input:checked + .preset-card { border-color: var(--sage-deep); box-shadow: 0 0 0 2px var(--sage-deep); }
.preset input:focus-visible + .preset-card { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatches { display: flex; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.swatches i { flex: 1; }
.swatches-custom { align-items: center; justify-content: center; font-size: 18px; color: var(--muted); border-style: dashed; }
.preset-name { font-size: 12px; font-weight: 500; }
.colors { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.color-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.color-row > span:first-child small { display: block; margin-top: 2px; }
.color-input { display: inline-flex; align-items: center; gap: 10px; }
.color-input input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; }
.color-input input[type=color]:disabled { opacity: .4; cursor: not-allowed; }
.hex { width: 92px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: 13px ui-monospace, Menlo, monospace; color: var(--ink); text-transform: lowercase; }
.hex:disabled { opacity: .5; }
.color-row .check { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.preview-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tabs-mini { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.tabs-mini button { padding: 6px 14px; border-radius: 999px; font-size: 12px; transition: background .2s, color .2s; }
.tabs-mini button.on { background: var(--sage-deep); color: var(--on-accent); }
.preview-frame { position: relative; margin: 0 auto 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 20px 50px -30px rgba(var(--shadow-rgb), .5); }
.preview-frame iframe { display: block; border: 0; transform-origin: 0 0; background: var(--paper); }
#aparencia .theme-preview { grid-column: 1 / -1; }
#theme-reset { display: none; }

/* ---------- Configurações > Aparência: fontes ---------- */
.fonts { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; border-top: 1px solid var(--line); }
.fonts > h3 { margin-top: 20px; }
.fpresets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.fpreset, .fchip { cursor: pointer; }
.fpreset input, .fchip input, .sizes input { position: absolute; opacity: 0; pointer-events: none; }
.fpreset-card, .fchip-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.fpreset:hover .fpreset-card, .fchip:hover .fchip-card { border-color: var(--sage); }
.fpreset input:checked + .fpreset-card, .fchip input:checked + .fchip-card { border-color: var(--sage-deep); box-shadow: 0 0 0 2px var(--sage-deep); }
.fpreset input:focus-visible + .fpreset-card, .fchip input:focus-visible + .fchip-card, .sizes input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.fp-sample { display: flex; align-items: flex-end; justify-content: center; height: 46px; color: var(--ink); line-height: 1; overflow: hidden; }
.fp-sample b { font-weight: 400; font-size: 44px; line-height: .8; margin-right: 1px; transform: translateY(5px); }
.fp-sample span { font-size: 18px; letter-spacing: .02em; padding-bottom: 5px; }
.fp-plus { align-items: center; font-size: 22px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.fp-name { font-size: 12px; font-weight: 500; }
.fgroup { margin: 0; padding: 0; border: 0; min-width: 0; }
.fgroup legend { padding: 0; margin-bottom: 10px; }
.fchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fchip-card { padding: 10px 12px; }
.fchip-sample { font-size: 22px; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip-card small { font-size: 11px; color: var(--muted); }
.sizes { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.sizes label { position: relative; cursor: pointer; }
.sizes span { display: block; padding: 8px 18px; border-radius: 999px; font-size: 13px; transition: background .2s, color .2s; }
.sizes input:checked + span { background: var(--sage-deep); color: var(--on-accent); }
.fchip-body { font-size: 15px; }

/* ---------- Fontes personalizadas e fonte por elemento ---------- */
.elements { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.el-row { display: grid; grid-template-columns: 1fr minmax(150px, 220px); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.el-select, .font-fields select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; font-size: 13px; color: var(--ink); }
.el-tune { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; font-size: 13px; }
.el-tune .label { flex-basis: 100%; }
.el-tune input[type=number] { width: 76px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; color: var(--ink); }
.font-list { gap: 14px; }
.font-row { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.font-sample { font-size: 26px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.font-fields { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.font-fields .field { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.font-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 560px) { .font-fields { grid-template-columns: 1fr; } .el-row { grid-template-columns: 1fr; gap: 6px; } }
.rich-field { display: flex; flex-direction: column; gap: 6px; }
.rich-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.rich-tools select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; font-size: 13px; max-width: 100%; color: var(--ink); }
.rich-preview { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--paper); font-size: 20px; line-height: 1.4; color: var(--ink); }
.rich-hint { display: block; margin-bottom: 4px; font-size: 12px; color: var(--sage-deep); }
.rich-unknown { text-decoration: underline wavy; }

/* tipos de entrega (configurações) */
.type-box { padding: 0; }
.type-box > summary { cursor: pointer; padding: 18px 24px; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.type-box > summary::-webkit-details-marker { display: none; }
.type-box > summary::after { content: "+"; margin-left: auto; font-size: 20px; line-height: 1; }
.type-box[open] > summary::after { content: "–"; }
.type-box > .stack { padding: 0 24px 24px; }

.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--sage-deep); }
.home-covers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home-covers .thumbs { grid-template-columns: minmax(110px, 160px); }

/* abas das configurações */
.config-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; margin: -12px 0 28px; padding: 10px 0; background: var(--paper, #fff); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.config-tabs a { flex-shrink: 0; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink); transition: background .2s, color .2s, border-color .2s; }
.config-tabs a:hover { border-color: var(--ink); }
.config-tabs a.on { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--on-accent); }

.home-veil { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
