/* Impressão pela internet (print.js). Carregado só no produto Photoboo, por cima
   do app.css — nunca editar o app.css para a impressão. */

/* ---------- indicador da impressora no topo ---------- */
.print-chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 14px; border-radius: 999px; background: #111113; border: 1px solid #2a2a30; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.print-chip i { width: 9px; height: 9px; border-radius: 50%; background: #6b6862; }
.print-chip.on i { background: #58c27a; box-shadow: 0 0 0 3px rgba(88,194,122,.18); }
.print-chip:hover, .print-chip:focus-visible { border-color: var(--accent); outline: none; }

/* ---------- tela do resultado ---------- */
.print-box { display: inline-flex; align-items: center; gap: 8px; }
.print-copies { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(20,20,24,.75); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); }
.print-copies button { width: 38px; height: 38px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink); }
.print-copies button:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.print-copies button:disabled { opacity: .3; cursor: default; }
.print-copies b { min-width: 30px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.print-cta:disabled { opacity: .6; cursor: progress; }
.print-status { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 18px; line-height: 1.35; background: rgba(10,10,12,.82); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); font-size: 14px; font-weight: 600; text-align: center; }
.print-status.good { border-color: rgba(88,194,122,.6); color: #a9e6bd; }
.print-status.warn { border-color: rgba(232,194,106,.6); color: var(--accent); }
.print-status.bad { border-color: #7a2a2a; background: #3a1414; color: #ffd9d4; }

/* ---------- configuração de impressão ---------- */
dialog.print-setup { width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; overflow: hidden; }
dialog.print-setup[open] { display: flex; flex-direction: column; }
.ps-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.ps-head h2 { margin: 0; font-size: 20px; }
.ps-saved { flex: 1; font-size: 13px; color: #8fd3a5; }
.ps-close { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-size: 22px; line-height: 1; }
.ps-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; padding: 6px 22px 22px; overflow-y: auto; }
.ps-controls h3 { margin: 18px 0 9px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ps-controls h3 small { font-weight: 500; letter-spacing: 0; text-transform: none; margin-inline-start: 6px; }
.ps-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ps-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-height: 92px; padding: 10px 6px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.ps-tile i { display: block; border: 2px solid currentColor; border-radius: 3px; }
.ps-tile small { font-size: 11px; font-weight: 500; }
.ps-tile.on { border-color: var(--accent); color: var(--ink); background: #1c1810; }
.ps-tile:hover, .ps-tile:focus-visible { border-color: var(--accent); outline: none; }
.ps-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.ps-seg button { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ps-seg button.on { background: var(--ink); color: var(--bg); }
.ps-note { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ps-note.warn { color: var(--accent); }
.ps-note:empty { display: none; }
.ps-line { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-upload { cursor: pointer; }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.ps-row em { margin-inline-start: 8px; font-style: normal; font-size: 12px; color: var(--muted); }
.ps-number { width: 104px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); text-align: end; user-select: text; outline: none; }
.ps-number:focus { border-color: var(--accent); }
.ps-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.ps-stepper button { width: 32px; height: 32px; border-radius: 50%; font-size: 19px; line-height: 1; }
.ps-stepper button:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.ps-stepper button:disabled { opacity: .3; cursor: default; }
.ps-stepper b { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
dialog.print-setup label.check { margin-top: 8px; font-size: 14px; }
dialog.print-setup select { width: 100%; }
.ps-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 18px; }
.ps-paper { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 262px; padding: 6px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.ps-paper canvas { display: block; border-radius: 2px; box-shadow: 0 6px 22px rgba(0,0,0,.55); }
.ps-preview .pill { margin-top: 12px; }
.ps-preview .ps-note { text-align: center; }
.ps-open { align-self: flex-start; }

@media (max-width: 720px) {
  .ps-body { grid-template-columns: minmax(0, 1fr); }
  .ps-preview { order: -1; padding-top: 12px; }
  .print-chip span { display: none; }
  .print-chip { padding: 0; width: 40px; height: 40px; justify-content: center; }
}

/* ---------- convidados pelo QR (guest-admin.js) ---------- */
#guest-chip i { background: #6b6862; }
#guest-chip.on i { background: var(--accent); box-shadow: 0 0 0 3px rgba(232,194,106,.18); }
.gq-text { width: 190px; text-align: start; }
.gq-time { width: 210px; text-align: start; color-scheme: dark; }
.gq-qr { padding: 12px; border-radius: 16px; background: #fff; display: inline-flex; }
.gq-qr canvas { display: block; width: 236px !important; height: 236px !important; }
#gq-qr-box { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.gq-link { max-width: 100%; word-break: break-all; font-size: 12px; user-select: all; -webkit-user-select: all; text-align: center; }
.gq-buttons { justify-content: center; margin-top: 8px; }

/* ---------- tela do evento (event-setup.js) ---------- */
#event-chip span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.event-setup .ev-n { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 6px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; letter-spacing: 0; }
.ev-input { width: 100%; padding: 13px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 17px; outline: none; user-select: text; }
.ev-input:focus { border-color: var(--accent); }
.ev-gap { margin-top: 10px; }
.ev-seg { flex-wrap: wrap; border-radius: 18px; }
.ev-start { width: 100%; margin-top: 14px; }
.ev-start:disabled { opacity: .6; }
@media (max-width: 720px) { #event-chip { display: inline-flex; width: auto; height: auto; padding: 9px 12px; } #event-chip span { display: inline; max-width: 110px; } }

/* Com os botões do evento no topo, a frase do cabeçalho só cabe em telas bem largas. */
@media (max-width: 1500px) {
  .mode-app .brand-promise { display: none; }
  .mode-app .top { grid-template-columns: auto minmax(0, 1fr); }
  .mode-app .brand-signature { display: none; }
  .mode-app .account-email { display: none; }
  .mode-app .account-chip { padding-left: 6px; }
  .mode-app #search { flex: 1 1 110px; width: auto; min-width: 90px; max-width: 220px; }
}
/* Rede de segurança: se ainda assim não couber, os botões descem para uma segunda linha em vez de cobrir o logo. */
.mode-app .top-tools { flex-wrap: wrap; row-gap: 8px; }
#event-chip span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.ev-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ev-mode { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); text-align: start; color: var(--muted); }
.ev-mode strong { font-size: 15px; color: var(--ink); }
.ev-mode span { font-size: 12px; line-height: 1.35; }
.ev-mode.on { border-color: var(--accent); background: #1c1810; }
.ev-mode:hover, .ev-mode:focus-visible { border-color: var(--accent); outline: none; }
@media (max-width: 720px) { .ev-modes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tela do QR (módulo de convidados) ---------- */
.gqs { align-items: center; justify-content: center; overflow-y: auto; padding: 24px; }
.gqs-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 720px; }
.gqs-kicker { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .2em; }
.gqs h1 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(38px, 6vw, 72px); line-height: 1; margin: 0 0 6px; }
.gqs-qr { padding: 18px; border-radius: 24px; }
.gqs-qr canvas { width: min(46vh, 70vw) !important; height: min(46vh, 70vw) !important; }
.gqs-cta { font-size: clamp(18px, 2.4vw, 26px); font-weight: 600; }
.gqs-cta.he { font-family: "Heebo", "DM Sans", sans-serif; color: #d9d3c6; }
.gqs-state { color: var(--muted); font-size: 15px; }
.gqs-buttons { display: flex; gap: 10px; margin-top: 6px; opacity: .75; }

/* ---------- módulo Upload: lote por estilo (batch.js) ---------- */
.bt { background: var(--bg); }
.bt-top { display: flex; align-items: center; gap: 16px; padding: 16px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); flex: none; }
.bt-top h1 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); line-height: 1; margin: 0; }
.bt-top h1 em { color: var(--accent); }
.bt-sum { flex: 1; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.bt-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.bt-side { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); padding: 12px; gap: 10px; }
.bt-side input { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; outline: none; user-select: text; }
.bt-styles { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.bt-style { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; border: 1px solid transparent; text-align: start; color: var(--muted); font-size: 14px; font-weight: 600; }
.bt-style img { width: 38px; height: 50px; border-radius: 6px; object-fit: cover; flex: none; background: #000; }
.bt-style span { flex: 1; min-width: 0; }
.bt-style i { font-style: normal; font-size: 12px; color: var(--accent); }
.bt-style.on { border-color: var(--accent); background: #1c1810; color: var(--ink); }
.bt-style:hover { color: var(--ink); }
.bt-main { min-height: 0; overflow-y: auto; padding: clamp(14px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 18px; }
.bt-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); }
.bt-drop.ready { border-color: #4a3d1f; }
.bt-drop.over { border-color: var(--accent); background: #1c1810; }
.bt-drop-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.bt-choose { cursor: pointer; margin-top: 4px; }
.bt-note { font-size: 14px; min-height: 1em; }
.bt-note.warn { color: var(--accent); }
.bt-group { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.bt-group header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.bt-group header > img { width: 40px; height: 52px; border-radius: 6px; object-fit: cover; }
.bt-ginfo { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.bt-ginfo strong { font-size: 16px; }
.bt-state { font-size: 13px; color: var(--muted); }
.bt-gbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.bt-gbtns .pill:disabled { opacity: .4; cursor: default; }
.bt-bar { height: 3px; background: var(--line); }
.bt-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; padding: 12px 14px 14px; }
.bt-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; padding: 6px; }
.bt-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bt-tile b { position: absolute; left: 6px; bottom: 6px; font-size: 10px; letter-spacing: .06em; padding: 3px 6px; border-radius: 5px; background: rgba(0,0,0,.7); color: #a9e6bd; }
.bt-tile b:empty { display: none; }
.bt-tile.working { border-color: #4a3d1f; animation: bt-pulse 1.2s ease-in-out infinite; }
.bt-tile.failed { border-color: #7a2a2a; color: #ffc9c2; }
@keyframes bt-pulse { 50% { background: #1c1810; } }
@media (max-width: 760px) { .bt-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 190px minmax(0, 1fr); } .bt-side { border-inline-end: 0; border-bottom: 1px solid var(--line); } }

/* Tela do QR: parede de efeitos passando de um lado para o outro, QR num cartão por cima. */
.gqs { position: fixed; }
.gqs-wall { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; overflow: hidden; }
.gqs-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5,5,6,.78) 0%, rgba(5,5,6,.5) 55%, rgba(5,5,6,.72) 100%); }
.gqs-row { display: flex; gap: 12px; width: max-content; animation: gqs-slide 80s linear infinite; will-change: transform; }
.gqs-row.rev { animation-direction: reverse; }
.gqs-row img { height: 31vh; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; flex: none; }
@keyframes gqs-slide { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }
@media (prefers-reduced-motion: reduce) { .gqs-row { animation: none; } }
.gqs-box { position: relative; z-index: 1; padding: clamp(18px, 3vw, 34px) clamp(20px, 4vw, 48px); border-radius: 28px; background: rgba(5,5,6,.84); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
/* Tela do QR em telas baixas: o cartão encolhe para caber inteiro. */
@media (max-height: 760px) {
  .gqs-box { gap: 6px; padding: 14px 24px; }
  .gqs h1 { font-size: clamp(26px, 6vh, 44px); margin: 0; }
  .gqs-qr { padding: 10px; border-radius: 16px; }
  .gqs-qr canvas { width: min(38vh, 70vw) !important; height: min(38vh, 70vw) !important; }
  .gqs-cta { font-size: clamp(14px, 3vh, 20px); }
}
.bt-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bt-copies { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 2px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.bt-copies button { width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; flex: none; }
.bt-copies button:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.bt-copies button:disabled { opacity: .25; cursor: default; }
.bt-copies b { font-size: 12px; font-weight: 700; white-space: nowrap; }
.bt-allcopies { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.bt-allcopies button { width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink); }
.bt-allcopies button:hover { background: rgba(255,255,255,.1); }

/* ---------- janela única de configurações (PBSettings, em print-core.js) ---------- */
dialog.pb-settings { width: min(1100px, calc(100% - 24px)); height: calc(100% - 24px); max-height: calc(100% - 24px); }
.pbs-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.pbs-nav { display: flex; flex-direction: column; gap: 3px; padding: 14px 10px; border-inline-end: 1px solid var(--line); overflow-y: auto; }
.pbs-nav button { padding: 10px 12px; border-radius: 10px; text-align: start; font-size: 14px; font-weight: 600; color: var(--muted); }
.pbs-nav button:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.pbs-nav button.on { color: var(--ink); background: #1c1810; }
.pbs-body { min-height: 0; overflow-y: auto; padding: 0 24px 8px; }
.pbs-section { padding: 20px 0 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 0; }
.pbs-section:last-child { border-bottom: 0; min-height: 40vh; }
.pbs-title { margin: 0; font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; line-height: 1; color: var(--ink); }
.pbs-section .ps-body { padding: 0; overflow: visible; grid-template-columns: minmax(0, 1fr) 280px; }
.pbs-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); flex: none; }
.pbs-foot:empty { display: none; }
.pbs-foot-note { flex: 1; margin: 0; }
.pbs-camera { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; max-width: 460px; }
.ev-logo-row { align-items: center; }
.ev-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #000; border: 1px solid var(--line); }
@media (max-width: 760px) {
  .pbs-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pbs-nav { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .pbs-nav button { flex: none; }
  .pbs-body { padding: 0 14px 8px; }
  .pbs-section .ps-body { grid-template-columns: minmax(0, 1fr); }
}

/* Troca de módulo nas telas principais (só aparece com mais de um módulo ligado). */
.pb-switch { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: #111113; border: 1px solid #2a2a30; flex: none; }
.pb-switch[hidden] { display: none; }
.pb-switch button { padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pb-switch button.on { background: var(--accent); color: var(--accent-ink); }

/* Tela de agradecimento (depois da foto, na cabine). */
.tk { align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #1d1a12 0%, #050506 70%); cursor: pointer; }
.tk-box { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 24px; }
.tk-logo { width: clamp(120px, 22vh, 220px); height: clamp(120px, 22vh, 220px); object-fit: contain; border-radius: 22%; animation: tk-pop .7s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 18px 50px rgba(232,194,106,.25)); }
.tk h1 { font-family: "Instrument Serif", serif; font-weight: 400; font-style: italic; color: var(--accent); font-size: clamp(54px, 11vw, 140px); line-height: 1; animation: tk-rise .7s .2s ease-out both; }
.tk-event { font-size: clamp(18px, 2.6vw, 30px); color: #d9d3c6; animation: tk-rise .7s .35s ease-out both; }
.tk-bar { width: min(280px, 50vw); height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 18px; }
.tk-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
@keyframes tk-fill { to { width: 100%; } }
@keyframes tk-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tk-rise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- limites: uma tabela só (total do evento, cada convidado, cada foto) ---------- */
.lim-lead { margin-top: 12px; font-size: 14px; color: var(--ink); }
.lim-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lim-grid > * { padding: 12px 14px; border-top: 1px solid var(--line); min-width: 0; }
.lim-grid > .lim-head { border-top: 0; padding-block: 9px; background: #151518; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lim-name { display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.lim-name b { font-size: 15px; }
.lim-name small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.lim-name.off b { color: var(--muted); }
.lim-cell { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; border-inline-start: 1px solid var(--line); }
.lim-cell em { font-style: normal; font-size: 12px; color: var(--muted); }
.lim-cell em:empty { display: none; }
.lim-cell .ps-number { width: 100%; max-width: 130px; text-align: start; }
.lim-none { color: var(--muted); }
.lim-sum { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lim-sum.warn span:first-child { color: var(--accent); }
.lim-sum.warn { color: var(--muted); }
.gq-limits { color: var(--ink); }
@media (max-width: 720px) {
  .lim-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lim-grid > .lim-head:first-child { display: none; }
  .lim-name { grid-column: 1 / -1; padding-bottom: 4px; }
  .lim-name + .lim-cell { border-inline-start: 0; }
  .lim-name ~ .lim-cell { border-top: 0; }
}

/* ---------- galeria do evento (gallery.js) ---------- */
.print-chip.warn { border-color: #7a5a1f; color: var(--accent); }
.gl { flex-direction: column; padding: 0 var(--pick-gutter, 24px) 40px; }
.gl-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 0 14px; background: var(--bg); }
.gl-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gl-title strong { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-title span { font-size: 13px; color: var(--muted); }
.gl-space { flex: 1; }
.gl-gold { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.gl-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid #4a3d1f; background: #1c1810; color: var(--accent); font-size: 14px; }
.gl-body { display: flex; gap: 22px; align-items: flex-start; }
.gl-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: start; }
.gl-tile { display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: #111113; border: 1px solid #1f1f23; padding: 0; }
.gl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-tile:hover, .gl-tile:focus-visible { border-color: var(--accent); outline: none; }
.gl-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 520px; margin: 0 auto; }
.gl-empty:empty { display: none; }
.gl-side { position: sticky; top: 86px; flex: none; width: 270px; padding: 18px; border-radius: 16px; background: #111113; border: 1px solid var(--line); text-align: center; }
.gl-side h3 { font-size: 15px; margin: 0 0 12px; }
.gl-qr { background: #fff; border-radius: 12px; padding: 8px; }
.gl-qr canvas { display: block; width: 100% !important; height: auto !important; }
.gl-link { margin-top: 10px; font-size: 12px; color: var(--muted); word-break: break-all; user-select: all; }
.gl-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.gl-hint { margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.gl-admin { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); }
a.pill { text-decoration: none; display: inline-flex; align-items: center; }
.gl-view { width: min(96vw, 1100px); max-width: none; height: min(94vh, 900px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #0b0b0d; color: var(--ink); overflow: hidden; }
.gl-view[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
.gl-view::backdrop { background: rgba(0,0,0,.78); }
.gl-view #gl-full { width: 100%; height: 100%; min-height: 0; object-fit: contain; display: block; }
.gl-x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid var(--line); font-size: 22px; line-height: 1; }
.gl-arrow { position: absolute; top: 45%; z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid var(--line); font-size: 28px; line-height: 1; }
.gl-arrow[hidden] { display: none; }
.gl-prev { left: 12px; } .gl-next { right: 12px; }
.gl-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px 6px; }
.gl-bar .cta { padding: 10px 26px; }
.gl-danger { color: #ffb4a8; border-color: #5a2a2a; }
.gl-status { min-height: 22px; padding: 0 16px 12px; text-align: center; font-size: 14px; color: var(--muted); }
.gl-go { flex: none; }
@media (max-width: 820px) {
  .gl-body { flex-direction: column-reverse; }
  .gl-side { position: static; width: 100%; }
  .gl-qr { max-width: 240px; margin: 0 auto; }
  .gl-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
}
/* QR da galeria na tela de agradecimento */
.tk-gallery { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; animation: tk-rise .7s .5s ease-out both; }
.tk-gallery[hidden] { display: none; }
.tk-gallery canvas { width: clamp(150px, 24vh, 240px) !important; height: clamp(150px, 24vh, 240px) !important; border-radius: 14px; background: #fff; }
.tk-gallery span { font-size: clamp(16px, 2.2vw, 24px); font-weight: 700; color: #fff; }
.tk.with-qr h1 { font-size: clamp(44px, 8vw, 100px); }
.tk.with-qr .tk-logo { width: clamp(90px, 14vh, 150px); height: clamp(90px, 14vh, 150px); }

.gl { overflow-y: auto; }

/* ---------- produto: o que é da demonstração não aparece ---------- */
/* O modelo de IA é o do evento (Settings → Event): o convidado não troca na câmera. */
.mode-app #quality, .mode-app .preview-credit, .mode-app #result-info { display: none !important; }
/* Sair da conta e a engrenagem antiga moram na janela de configurações. */
.mode-app #account-chip, .mode-app #btn-settings { display: none !important; }

/* ---------- tipografia da área do operador ----------
   Ver docs/escrita-e-tipografia.md. Cinco tamanhos, cada um com um papel:
   28 título de seção (serifada) · 12 rótulo de grupo (maiúsculas espaçadas) ·
   15 controles e valores · 13 texto de ajuda (linha ≤ 64 caracteres) · números alinhados. */
.pb-settings { --t-help: 13px; --t-body: 15px; }
.pb-settings .ps-row, .pb-settings label.check { font-size: var(--t-body); }
.pb-settings .ps-note { font-size: var(--t-help); line-height: 1.5; max-width: 64ch; }
.pb-settings .ps-preview .ps-note { max-width: none; }
.pb-settings .ps-stepper b, .pb-settings .ps-number, .lim-cell em { font-variant-numeric: tabular-nums; }
.ps-saved.bad { color: #ffb4a8; }

/* ---------- botão de configurações com o nome do evento ---------- */
.ev-chip b { font-weight: 400; font-size: 15px; line-height: 1; }
.ev-chip span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- "Pronto para o evento?" ---------- */
.ev-check { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ev-check-title { padding: 10px 14px; background: #1c1810; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.ev-check-title.ok { background: #101a13; color: #8fd3a5; }
.ev-check-row { display: grid; grid-template-columns: 22px 150px minmax(0, 1fr); align-items: baseline; gap: 10px; width: 100%; padding: 9px 14px; border-top: 1px solid var(--line); text-align: start; font-size: 14px; }
.ev-check-row:hover, .ev-check-row:focus-visible { background: rgba(255,255,255,.04); outline: none; }
.ev-check-row i { font-style: normal; font-weight: 800; color: #8fd3a5; }
.ev-check-row.todo i { color: var(--accent); }
.ev-check-row b { font-weight: 700; }
.ev-check-row span { color: var(--muted); overflow-wrap: anywhere; }
.ev-check-row.todo span { color: var(--accent); }
@media (max-width: 720px) { .ev-check-row { grid-template-columns: 22px minmax(0, 1fr); } .ev-check-row span { grid-column: 2; } }

/* ---------- rodapé das configurações: conta ---------- */
.pbs-account { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; color: var(--muted); }
.pbs-account > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pbs-link { padding: 0; font-size: 13px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ev-pin-row .ps-number { width: 150px; text-align: start; letter-spacing: .2em; }
.ev-pin-row .ps-number::placeholder { letter-spacing: 0; }
@media (max-width: 720px) { .pbs-foot { flex-wrap: wrap; } .pbs-account { flex-basis: 100%; } }

/* ---------- tela travada para convidados ---------- */
.pb-locked .top-tools > :not(#search) { display: none !important; }
.pb-locked #scr-guestqr .gqs-buttons, .pb-locked .gl-go { display: none !important; }
.pb-locked .brand, .pb-locked #gqs-name { touch-action: none; -webkit-touch-callout: none; user-select: none; }
.pb-toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px); max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: #1c1810; border: 1px solid #4a3d1f; color: var(--ink); font-size: 14px; line-height: 1.4; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.pb-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pb-pin { width: min(360px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #111113; color: var(--ink); text-align: center; }
.pb-pin::backdrop { background: rgba(0,0,0,.8); }
.pb-pin h2 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; line-height: 1; }
.pb-pin p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.pb-pin input { width: 100%; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); text-align: center; font-size: 22px; letter-spacing: .3em; outline: none; user-select: text; }
.pb-pin input:focus { border-color: var(--accent); }
.pb-pin-error { min-height: 20px; color: #ffb4a8 !important; }
.pb-pin-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0 14px; }
/* Ordem fixa do topo: troca de módulo · busca · configurações · estados · travar · tela cheia. */
.mode-app .top-tools > .pb-switch { order: 0; }
.mode-app .top-tools > #search { order: 1; }
.mode-app .top-tools > #event-chip { order: 2; }
.mode-app .top-tools > #guest-chip { order: 3; }
.mode-app .top-tools > #gallery-chip { order: 4; }
.mode-app .top-tools > #print-chip { order: 5; }
.mode-app .top-tools > #lock-chip { order: 6; }
.mode-app .top-tools > #btn-full { order: 7; }
.pbs-account { margin-inline-end: auto; }
.pbs-foot-note:empty { display: none; }
/* Tela travada (convidados): a foto vai para a galeria; baixar neste computador não é para eles. */
.pb-locked #btn-download { display: none !important; }
/* Painel da galeria (o mesmo do Photoboo) dentro da tela da galeria. */
.gl-panel { flex: 1; width: calc(100% + 2 * var(--pick-gutter, 24px)); min-height: 0; margin: 0 calc(-1 * var(--pick-gutter, 24px)); border: 0; border-top: 1px solid var(--line); background: #fff; }
.gl-panel[hidden], .gl-body[hidden] { display: none; }
.gl:has(.gl-panel:not([hidden])) { padding-bottom: 0; overflow: hidden; }
.gl-tabs[hidden] { display: none; }
.gl-tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: #111113; border: 1px solid #2a2a30; flex: none; }
.gl-tabs button { padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.gl-tabs button.on { background: var(--accent); color: var(--accent-ink); }
/* Celular: o logo numa linha, os botões do operador na de baixo (quebrando), a busca por último. */
@media (max-width: 760px) {
  .mode-app .top { grid-template-columns: minmax(0, 1fr); }
  .mode-app .top-tools { display: flex; flex-wrap: wrap; justify-content: flex-start; }
  .mode-app .top-tools > #search { order: 9; flex: 1 1 100%; max-width: none; width: auto; }
  .mode-app .ev-chip span { max-width: 130px; }
}
