/* Referências de design (aba Prompts e sites > Referências). Carregado depois dos temas. */
#refBody [hidden] { display: none !important; }

/* galerias externas */
.rgal { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rgal a { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--color-control); border-radius: 14px; color: var(--color-glyph); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.rgal a:hover { border-color: var(--color-steel); background: var(--color-graphite); }
.rgal strong { color: #fff; font: 600 15px var(--font-main); }
.rgal span { font-size: 13px; color: var(--color-steel); }

/* filtros */
.rchips { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; padding: 2px 2px 6px; scrollbar-width: none; }
.rchips::-webkit-scrollbar { display: none; }
.rchip { flex: none; min-height: 38px; padding: 0 14px; border: 1px solid var(--color-control); border-radius: 99px; background: transparent; color: var(--color-glyph); font: 500 13px var(--font-main); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease; }
.rchip:hover { border-color: var(--color-steel); }
.rchip:active { transform: scale(.97); }
.rchip[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }

/* grade de modelos */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.rcard { display: grid; gap: 10px; align-content: start; padding: 10px 10px 14px; border: 1px solid var(--color-control); border-radius: 22px; background: var(--color-carbon); content-visibility: auto; contain-intrinsic-size: 280px 340px; transition: border-color .15s ease; }
.rcard:hover { border-color: var(--color-divider); }
.rthumbbtn { display: block; width: 100%; padding: 0; border: 0; border-radius: 14px; background: none; cursor: zoom-in; }
.rthumbbtn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.rmeta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.rmeta h3 { margin: 0; color: #fff; font: 600 15px/1.3 var(--font-main); }
.rtag { color: var(--color-steel); font: 500 12px var(--font-main); white-space: nowrap; }
.rsw { display: flex; gap: 5px; padding: 0 4px; }
.rsw span { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.rfont { margin: 0; padding: 0 4px; color: var(--color-steel); font-size: 12.5px; }
.rcard .obtns { padding: 0 4px; }

/* ---------- miniatura: mesmas peças, cada estilo reposiciona ---------- */
.rthumb { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--bg); color: var(--tx); container-type: inline-size; font-family: var(--fd), Georgia, serif; text-align: left; }
.rthumb .rt-line { display: block; height: max(3px, .9cqw); border-radius: 2px; background: var(--mu); opacity: .55; }
.rt-nav { position: absolute; z-index: 2; top: 5%; left: 5%; right: 5%; display: flex; align-items: center; gap: 4%; }
.rt-logo { width: 9%; height: 2.4cqw; border-radius: 2px; background: var(--tx); }
.rt-links { display: flex; flex: 1; justify-content: flex-end; gap: 4%; }
.rt-links .rt-line { width: 9% !important; }
.rt-pill { width: 12%; height: 4.2cqw; border-radius: 99px; background: var(--pr); }
.rt-hero { position: absolute; z-index: 2; top: 23%; left: 5%; width: 54%; }
.rt-h { margin: 0; color: var(--tx); font-size: 7.2cqw; font-weight: 400; line-height: 1; letter-spacing: -.01em; }
.rt-sub { display: grid; gap: 1.4cqw; margin: 4cqw 0 4.4cqw; }
.rt-cta { display: inline-block; padding: 1.7cqw 4cqw; border-radius: 99px; background: var(--pr); color: var(--on); font: 600 2.6cqw/1.2 Inter, system-ui, sans-serif; }
.rt-media { position: absolute; z-index: 1; top: 23%; right: 5%; bottom: 11%; width: 33%; border-radius: 6px; background: linear-gradient(160deg, var(--sf) 10%, color-mix(in srgb, var(--ac) 60%, var(--sf))); }
.rt-tiles, .rt-glow, .rt-shape { display: none; }

/* minimal suíço: cantos retos, fio fino, tudo na grade */
.rt-minimal .rt-media { border-radius: 0; }
.rt-minimal .rt-cta { border-radius: 3px; }
.rt-minimal::after { content: ""; position: absolute; left: 5%; right: 5%; top: 16%; height: 1px; background: var(--tx); opacity: .15; }

/* luxo escuro: título centrado, botão contornado, faixa de foto embaixo */
.rt-escuro .rt-hero { left: 12%; width: 76%; top: 25%; text-align: center; }
.rt-escuro .rt-sub { justify-items: center; }
.rt-escuro .rt-h { font-size: 7.8cqw; }
.rt-escuro .rt-cta { border: 1px solid var(--pr); border-radius: 0; background: transparent; color: var(--pr); letter-spacing: .14em; text-transform: uppercase; font-size: 2.1cqw; }
.rt-escuro .rt-media { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 14%; border-radius: 0; opacity: .7; }
.rt-escuro .rt-pill { background: transparent; box-shadow: inset 0 0 0 1px var(--pr); }

/* editorial: manchete larga, foto à esquerda, colunas de texto */
.rt-editorial .rt-hero { top: 17%; width: 90%; }
.rt-editorial .rt-h { font-size: 8.6cqw; }
.rt-editorial .rt-sub, .rt-editorial .rt-cta { display: none; }
.rt-editorial .rt-media { top: 50%; left: 5%; right: auto; bottom: 7%; width: 38%; border-radius: 0; }
.rt-editorial .rt-tiles { display: grid; position: absolute; top: 50%; right: 5%; bottom: 7%; width: 49%; grid-template-columns: 1fr 1fr; gap: 5%; }
.rt-editorial .rt-tiles span { border-top: 2px solid var(--tx); background: repeating-linear-gradient(to bottom, transparent 0 1.6cqw, var(--mu) 1.6cqw calc(1.6cqw + 2px)); opacity: .55; }
.rt-editorial .rt-tiles span:nth-child(3) { display: none; }

/* blocos vibrantes: letra gigante, forma geométrica */
.rt-vibrante .rt-hero { width: 66%; top: 21%; }
.rt-vibrante .rt-h { font-size: 10cqw; line-height: .92; text-transform: uppercase; }
.rt-vibrante .rt-media { display: none; }
.rt-vibrante .rt-shape { display: block; position: absolute; top: 22%; right: -6%; width: 40cqw; height: 40cqw; border-radius: 50%; background: var(--ac); }
.rt-vibrante .rt-cta { padding: 2.2cqw 5cqw; font-size: 3cqw; }
.rt-vibrante .rt-line { background: var(--tx); opacity: .45; }

/* bento: título dentro de um card, grade de cards ao lado */
.rt-bento .rt-hero { top: 18%; bottom: 7%; width: 47%; padding: 4cqw; border-radius: 10px; background: var(--sf); box-sizing: border-box; }
.rt-bento .rt-h { font-size: 5.6cqw; }
.rt-bento .rt-media { top: 18%; bottom: auto; width: 41%; height: 38%; border-radius: 10px; }
.rt-bento .rt-tiles { display: grid; position: absolute; top: 59%; right: 5%; bottom: 7%; width: 41%; grid-template-columns: 1fr 1fr 1fr; gap: 3cqw; }
.rt-bento .rt-tiles span { border-radius: 10px; background: var(--sf); }
.rt-bento .rt-tiles span:first-child { grid-column: span 2; background: var(--pr); }
.rt-bento .rt-tiles span:last-child { display: none; }

/* orgânico: foto em forma orgânica, tudo arredondado */
.rt-organico .rt-media { top: 15%; right: 6%; bottom: 9%; width: 36%; border-radius: 48% 52% 44% 56% / 56% 44% 56% 44%; }
.rt-organico .rt-logo { border-radius: 99px; }
.rt-organico .rt-shape { display: block; position: absolute; left: -8%; bottom: -18%; width: 34cqw; height: 22cqw; border-radius: 50%; background: var(--sf); opacity: .8; }

/* neo-brutalista: borda preta grossa e sombra dura */
.rt-brutalista .rt-h { font-size: 7cqw; text-transform: uppercase; }
.rt-brutalista .rt-media { border: .6cqw solid #000; border-radius: 0; background: var(--sf); box-shadow: 1.2cqw 1.2cqw 0 #000; }
.rt-brutalista .rt-cta { border: .5cqw solid #000; border-radius: 4px; box-shadow: .9cqw .9cqw 0 #000; }
.rt-brutalista .rt-pill { border: .4cqw solid #000; border-radius: 4px; }
.rt-brutalista .rt-shape { display: block; position: absolute; z-index: 3; top: 17%; right: 31%; width: 13cqw; height: 13cqw; border: .5cqw solid #000; border-radius: 50%; background: var(--ac); transform: rotate(-12deg); }

/* aurora: brilhos de gradiente e card de vidro */
.rt-aurora .rt-glow { display: block; position: absolute; z-index: 0; width: 75%; aspect-ratio: 1; border-radius: 50%; opacity: .5; }
.rt-aurora .g1 { top: -45%; left: -20%; background: radial-gradient(circle, var(--g1), transparent 66%); }
.rt-aurora .g2 { right: -25%; bottom: -55%; background: radial-gradient(circle, var(--g2), transparent 66%); }
.rt-aurora .rt-hero { left: 14%; width: 72%; top: 24%; text-align: center; }
.rt-aurora .rt-sub { justify-items: center; margin-bottom: 3cqw; }
.rt-aurora .rt-cta { display: none; }
.rt-aurora .rt-media { top: auto; left: 28%; right: 28%; bottom: 9%; width: auto; height: 22%; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .07); }

/* ---------- detalhes ---------- */
.qcbox.rdbox { width: min(980px, 94vw); max-height: 92vh; overflow: auto; }
.rdbox .qchead .ohint { margin: 6px 0 0; max-width: 62ch; }
.rthumb.big { margin: 14px 0 6px; border-radius: 18px; }
.rdcols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 10px; }
.rdh { margin: 16px 0 8px; color: #fff; font: 600 14px var(--font-main); letter-spacing: .04em; text-transform: uppercase; }
.rdpal { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rdcolor { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--color-glyph); font: 500 13px var(--font-main); text-align: left; cursor: copy; }
.rdcolor:hover { border-color: var(--color-control); }
.rdcolor .lab { flex: 1; }
.rdcolor code { color: var(--color-steel); font-size: 12.5px; }
.rdcolor.done code { color: var(--color-accent); }
.rdsw { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.rdprompt { max-height: 340px; overflow: auto; margin: 0; padding: 14px 16px; border: 1px solid var(--color-control); border-radius: 14px; background: var(--color-absolute-black); color: var(--color-glyph); font: 12.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; }

@media (max-width: 760px) {
  .rdcols { grid-template-columns: 1fr; gap: 0; }
  .rgrid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rchip, .rcard, .rgal a { transition: none; }
}

/* coleção de marcas e modelos prontos */
.rsub { margin: -4px 0 0; padding: 0 4px; color: var(--color-steel); font-size: 12.5px; }
.rgalgroup + .rgalgroup { margin-top: 6px; }
.rgalgroup .rdh { margin-top: 12px; }
.rdrules { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--color-glyph); font-size: 14px; }
.rdpick { display: grid; gap: 6px; margin-top: 6px; }
.rdpick .rdh { margin-bottom: 0; }
.rdpick select { min-height: 44px; max-width: 420px; padding: 0 12px; border: 1px solid var(--color-control); border-radius: 12px; background: var(--color-absolute-black); color: var(--color-glyph); font: 500 14px var(--font-main); }

/* galerias recolhíveis e chips em várias linhas no computador */
.rgaldet > summary { list-style: none; cursor: pointer; }
.rgaldet > summary::-webkit-details-marker { display: none; }
.rgaldet > summary::after { content: "+"; margin-left: 10px; color: var(--color-steel); font: 400 22px/1 var(--font-main); transition: transform .2s ease; }
.rgaldet[open] > summary::after { transform: rotate(45deg); }
.rgaldet > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 8px; }
@media (min-width: 900px) {
  .rchips { flex-wrap: wrap; overflow: visible; }
}

/* selo Motion e seletor de intensidade */
.rmotion { display: inline-block; margin-left: 8px; padding: 0 7px; border: 1px solid var(--color-divider); border-radius: 99px; color: var(--color-glyph); font: 600 11px/18px var(--font-main); letter-spacing: .02em; vertical-align: 1px; }
.rdlevels { margin-top: 0; }
