/* Mur de questions : styles communs. Les couleurs viennent du thème de chaque événement (core.js > applyTheme). */
:root {
  --brand: #0F766E; --brand-ink: #fff; --heart: #E5484D;
  --bg: #F5F4EF; --surface: #fff; --ink: #16151A; --muted: #6B6A73; --line: rgba(22,21,26,.09);
  --radius: 16px; --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(16,15,20,.04), 0 10px 30px -18px rgba(16,15,20,.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; transition: background .3s; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.spacer { flex: 1; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .12s, filter .2s, background .2s; }
a.btn { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-danger { color: #C0352B; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- en-tête ---------- */
.demo-strip { background: #16151A; color: #fff; font-size: 12.5px; text-align: center; padding: 7px 16px; }
.demo-strip a { color: #9EE6D5; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.brand img { height: 40px; width: auto; max-width: 170px; object-fit: contain; }
.brand img + .bname { display: none; }   /* le logo porte déjà le nom */
/* Sur fond sombre, le logo passe en blanc (réglable : Personnalisation > Logo sur fond sombre) */
html[data-logo="auto"][data-dark="1"] .brand img,
html[data-logo="auto"] body.screen .brand img { filter: brightness(0) invert(1); }
.brand .mark { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.brand .bname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; }
.budget .hearts { display: flex; gap: 2px; color: var(--heart); }
.budget i { display: flex; }
.budget svg { width: 15px; height: 15px; }
.budget i.full svg path { fill: currentColor; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- intro ---------- */
.hero { padding: 40px 0 22px; }
.hero h1 { margin: 0; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -.03em; font-weight: 650; }
.hero .sub { margin: 10px 0 0; font-size: 17px; color: var(--muted); max-width: 640px; }
.hero .stat { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.hero .stat svg { width: 16px; height: 16px; }
.closed { margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-weight: 500; }

/* ---------- épinglée ---------- */
.pinned { position: relative; margin: 0 0 22px; padding: 18px 20px; border-radius: calc(var(--radius) + 4px); background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; gap: 16px; overflow: hidden; }
.pinned .live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.pinned .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.pinned h3 { margin: 4px 0 0; font-size: 19px; line-height: 1.3; }
.pinned .heart { background: rgba(255,255,255,.16); border-color: transparent; color: inherit; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- barre de filtres ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 20px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); gap: 2px; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg button span { opacity: .55; margin-left: 4px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-left: auto; }
.filters::-webkit-scrollbar { display: none; }
.fchip { --tag: var(--ink); flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; transition: background .2s, color .2s; }
.fchip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tag); }
.fchip[data-tag="all"]::before { display: none; }
.fchip span { font-size: 12px; opacity: .55; }
.fchip.on { background: var(--tag); color: #fff; border-color: transparent; }
.fchip.on::before { background: #fff; }
.fchip[data-tag="all"].on { background: var(--ink); color: var(--bg); }

/* ---------- grille et cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: start; padding-bottom: 60px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.card { --tag: transparent; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px 20px; box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; left: -1px; top: 18px; width: 4px; height: 26px; border-radius: 0 4px 4px 0; background: var(--tag); }
.card.new { animation: arrive .7s cubic-bezier(.2,.8,.2,1); }
.card.answered { opacity: .78; }
@keyframes arrive { from { opacity: 0; transform: translateY(-10px) scale(.98); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.chip { --tag: #8A8A93; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--tag) 13%, var(--surface)); color: color-mix(in srgb, var(--tag) 78%, var(--ink)); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tag); }
.chip.plain { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.chip.plain::before { display: none; }
.chip svg { width: 13px; height: 13px; }
.chip.mine { background: color-mix(in srgb, var(--brand) 13%, var(--surface)); color: color-mix(in srgb, var(--brand) 80%, var(--ink)); }
.chip.ok { background: #DCF5E7; color: #146C3B; }
.chip.live { background: var(--brand); color: var(--brand-ink); }
.card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.32; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.card p { margin: 0 0 10px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.foot { display: flex; align-items: flex-end; gap: 10px; margin-top: 8px; }
.meta { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.meta .you { color: var(--heart); font-weight: 500; }
.ctrl { display: flex; gap: 8px; align-items: center; }
.heart { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; transition: background .2s, border-color .2s, transform .12s; }
.heart svg { width: 19px; height: 19px; }
.heart:active { transform: scale(.94); }
.heart.on { background: color-mix(in srgb, var(--heart) 12%, var(--surface)); border-color: color-mix(in srgb, var(--heart) 45%, transparent); color: var(--heart); }
.heart.on svg path { fill: currentColor; }
.heart.pop svg { animation: pop .45s; }
@keyframes pop { 30% { transform: scale(1.35); } 60% { transform: scale(.92); } }
/* Cœurs volants (animation au clic) */
.fx-heart { position: fixed; left: 0; top: 0; z-index: 85; pointer-events: none; color: var(--heart); will-change: transform, opacity; }
.fx-heart svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--heart) 45%, transparent)); }
.fx-heart svg path { fill: currentColor; }
.budget i.pulse svg { animation: pop .45s; }
.minus { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.minus svg { width: 16px; height: 16px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* ---------- formulaire (feuille) ---------- */
.fab { display: none; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(12,12,16,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.scrim.open { display: flex; }
.sheet { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); animation: rise .28s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.field { display: block; margin: 0 0 16px; position: relative; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin: 0 0 7px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input:not([type=color]):not([type=checkbox]):not([type=file]), .field textarea, .field select { width: 100%; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 3%, var(--surface)); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.count { position: absolute; right: 12px; bottom: -18px; font-size: 11.5px; color: var(--muted); }
.seg.kind { width: 100%; margin-bottom: 18px; }
.seg.kind button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; }
.seg.kind svg { width: 16px; height: 16px; }
.tagpick { display: flex; flex-direction: column; gap: 6px; }
.tgrow { display: flex; flex-wrap: wrap; gap: 8px; }
.tggrp { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 2px; }
.tggrp:first-child { margin-top: 0; }
.tagpick .fchip svg { width: 16px; height: 16px; margin-left: -2px; }
.tagpick .fchip.on::before { display: none; }
.fsep { flex: none; width: 1px; height: 24px; align-self: center; background: var(--line); margin: 0 4px; }
.tggrp-sel { flex: none; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); color: var(--ink); }
.tagpick .fchip.on { background: var(--tag); }

/* ---------- onglets mobiles (masqués sur ordinateur) ---------- */
.mtabs { display: none; }

/* ---------- boutons d'en-tête + modale QR ---------- */
.top-ic { flex: none; width: 40px; height: 40px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.qr-sheet { width: min(640px, 100%); text-align: center; }
.qr-lead { margin: -6px 0 14px; color: var(--muted); }
.qr-big { background: #fff; border-radius: 22px; padding: 18px; margin: 0 auto 14px; width: min(100%, 62vh, 460px); }
.qr-off { display: grid; place-items: center; height: 100%; padding: 20px; color: #333; font-size: 14px; }
.qr-url { font-weight: 600; font-size: 17px; word-break: break-all; margin-bottom: 16px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; max-width: min(92vw, 460px); padding: 13px 18px; border-radius: 14px; background: #16151A; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- mobile ---------- */
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .top .wrap { height: 60px; }
  .top .cta { display: none; }
  .budget .label { display: none; }
  .hero { padding: 26px 0 16px; }
  .hero .sub { font-size: 15.5px; }
  .toolbar { gap: 10px; }
  .filters { margin: 0 -16px; padding: 2px 16px; width: calc(100% + 32px); }
  .fab { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; height: 54px; border-radius: 16px; font-size: 16px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); }
  body.wall { padding-bottom: 90px; }
  .scrim { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 94vh; }
  .toast { bottom: 90px; }
  .pinned { flex-direction: column; align-items: flex-start; }

  /* Onglets du bas : gros, lisibles, toujours au même endroit */
  .fab { display: none !important; }
  .mtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.35); }
  .mtabs button { height: 58px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 16px; font-weight: 650;
    display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; padding: 0 8px; }
  .mtabs button svg { width: 20px; height: 20px; flex: none; }
  .mtabs button.on { background: var(--brand); color: var(--brand-ink); }
  body.wall { padding-bottom: 100px; }
  .toast { bottom: 100px; }

  /* « Poser une question » en page entière, sans fenêtre à fermer */
  body.m-ask main { display: none; }
  body.m-ask .scrim.open { position: static; display: block; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
  body.m-ask .sheet { width: 100%; max-height: none; border-radius: 0; box-shadow: none; background: transparent; padding: 22px 16px 120px; animation: none; }
  body.m-ask #close { display: none; }
  body.m-ask .sheet-head h2 { font-size: 26px; }

  /* Lisibilité : textes et zones de toucher plus grands */
  body.wall { font-size: 16px; }
  .field > span { font-size: 15px; }
  .field input:not([type=color]):not([type=checkbox]):not([type=file]), .field textarea { font-size: 18px; padding: 15px 16px; }
  .seg.kind button { height: 48px; font-size: 16px; }
  .tagpick .fchip { height: 44px; font-size: 15px; padding: 0 16px 0 14px; }
  #send { height: 58px; font-size: 18px; border-radius: 14px; }
  .card h3 { font-size: 18px; }
  .card p { font-size: 16px; }
  .heart { height: 48px; padding: 0 18px 0 15px; font-size: 17px; }
  .heart svg { width: 22px; height: 22px; }
  .minus { width: 48px; height: 48px; }
  .seg button { height: 40px; font-size: 15px; }
  .fchip { height: 40px; font-size: 15px; }
}

/* =========================================================
   ÉCRAN DE PROJECTION
   ========================================================= */
body.screen { --s-bg: color-mix(in srgb, var(--brand) 22%, #08080C); background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--brand) 45%, #08080C) 0%, var(--s-bg) 45%, #07070A 100%); color: #F4F4F6; height: 100vh; overflow: hidden; }
.scr { display: grid; grid-template-columns: minmax(300px, 29vw) 1fr; gap: 3.2vw; height: 100vh; padding: 4.5vh 3.5vw; }
.scr-aside { display: flex; flex-direction: column; gap: 2.4vh; min-height: 0; }
.scr-aside .brand { font-size: clamp(15px, 1.2vw, 22px); }
.scr-aside .brand img { height: clamp(56px, 11vh, 130px); max-width: 260px; }
.scr-aside .brand .mark { width: 4.2vh; height: 4.2vh; border-radius: 1.1vh; font-size: 1.6vh; }
.scr-aside h1 { margin: 1vh 0 0; font-size: clamp(30px, 3.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 650; }
.scr-aside .cta-txt { margin: 0; font-size: clamp(15px, 1.25vw, 24px); color: rgba(244,244,246,.7); }
.qrbox { margin-top: auto; background: #fff; color: #111; border-radius: 2.4vh; padding: 2.2vh; display: flex; flex-direction: column; gap: 1.4vh; align-items: center; width: min(100%, 44vh); }
.qr { width: 100%; aspect-ratio: 1; }
.qr canvas, .qr img { width: 100% !important; height: auto !important; display: block; image-rendering: pixelated; }
.qrbox .url { font-size: clamp(12px, 1.05vw, 20px); font-weight: 600; letter-spacing: -.01em; text-align: center; word-break: break-all; }
.scr-stats { display: flex; gap: 2.4vw; font-size: clamp(13px, 1vw, 18px); color: rgba(244,244,246,.65); }
.scr-stats b { display: block; font-size: clamp(24px, 2.4vw, 46px); color: #fff; font-weight: 650; letter-spacing: -.02em; line-height: 1.05; }
.scr-main { display: flex; flex-direction: column; gap: 2.6vh; min-height: 0; }
.scr-now { border-radius: 2.6vh; padding: 3vh 2.6vw; background: var(--brand); color: var(--brand-ink); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); animation: arrive .8s cubic-bezier(.2,.8,.2,1); }
.scr-now .live { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(12px, .95vw, 18px); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.scr-now .live::before { content: ""; width: 1.1vh; height: 1.1vh; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.scr-now h2 { margin: 1.2vh 0 0; font-size: clamp(24px, 2.6vw, 54px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.scr-now p { margin: 1vh 0 0; font-size: clamp(14px, 1.2vw, 24px); opacity: .8; }
.scr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.scr-head h3 { margin: 0; font-size: clamp(14px, 1.1vw, 21px); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: rgba(244,244,246,.6); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; overflow: hidden; }
.row { --tag: #888; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.6vw; padding: 1.9vh 1.6vw; border-radius: 2vh; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.07); }
.row.enter { animation: arrive .8s cubic-bezier(.2,.8,.2,1); }
.row.answered { opacity: .55; }
.rk { width: 5.2vh; height: 5.2vh; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: clamp(15px, 1.3vw, 26px); background: rgba(255,255,255,.08); }
.row:first-child .rk { background: var(--heart); color: #fff; }
.rk svg { width: 2.6vh; height: 2.6vh; }
.rt { font-size: clamp(16px, 1.55vw, 32px); font-weight: 550; line-height: 1.25; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rsub { display: flex; align-items: center; gap: 12px; margin-top: .8vh; }
.screen .chip { height: auto; padding: .35vh .8vw .35vh .6vw; font-size: clamp(11px, .85vw, 16px); background: color-mix(in srgb, var(--tag) 26%, transparent); color: color-mix(in srgb, var(--tag) 45%, #fff); }
.screen .chip.plain { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.bar { flex: 1; height: .7vh; min-height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--heart); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rh { display: flex; align-items: center; gap: .6vw; font-size: clamp(18px, 1.7vw, 34px); font-weight: 650; color: #fff; }
.rh svg { width: 1.3em; height: 1.3em; color: var(--heart); }
.rh svg path { fill: currentColor; }
.rh.bump { animation: pop .5s; }
.incoming { position: fixed; right: 3.5vw; bottom: 4.5vh; z-index: 10; width: min(40vw, 640px); padding: 2.2vh 1.8vw; border-radius: 2.2vh; background: #fff; color: #111; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); transform: translateY(140%); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.incoming:not(.show) { opacity: 0; visibility: hidden; transform: translateY(calc(100% + 8vh)); transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .3s, visibility 0s .6s; }
.incoming.show { transform: none; opacity: 1; visibility: visible; }
.incoming small { display: block; font-size: clamp(11px, .85vw, 16px); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--brand); }
.incoming div { margin-top: .6vh; font-size: clamp(16px, 1.35vw, 28px); font-weight: 600; line-height: 1.3; }
.scr-ctl { position: fixed; left: 50%; bottom: 2vh; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px; border-radius: 14px; background: rgba(20,20,26,.82); backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; z-index: 20; }
.scr-ctl.show { opacity: 1; }
.scr-ctl button { border: 0; background: transparent; color: #fff; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.scr-ctl button.on, .scr-ctl button:hover { background: rgba(255,255,255,.14); }
.scr-ctl svg { width: 16px; height: 16px; }
.scr-empty { padding: 6vh 2vw; border-radius: 2.4vh; border: 1px dashed rgba(255,255,255,.18); text-align: center; font-size: clamp(16px, 1.4vw, 28px); color: rgba(255,255,255,.65); }
.scr-err { margin: auto; font-size: 22px; }
@media (max-width: 900px), (orientation: portrait) {
  body.screen { height: auto; overflow: auto; }
  .scr { grid-template-columns: 1fr; height: auto; }
  .qrbox { width: min(100%, 320px); }
}

/* =========================================================
   ADMINISTRATION
   ========================================================= */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.login h1 { margin: 14px 0 4px; font-size: 24px; letter-spacing: -.02em; }
.login p { margin: 0 0 20px; color: var(--muted); }
.err { color: #C0352B; font-size: 13.5px; min-height: 20px; margin: 8px 0 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 12px; }
.codebox { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.codebox summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--heart); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.adm-main { padding: 26px 0 80px; }
.amenu { position: relative; flex: none; }
.amenu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 250px; padding: 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); }
.amenu-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.amenu-it:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.amenu-it svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.amenu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.amenu-danger, .amenu-danger svg { color: #D9443A; }
.adm-main h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.adm-main .lead { margin: 0 0 20px; color: var(--muted); }
.adm-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { flex: 1; min-width: 200px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 0 14px; outline: none; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { --tag: transparent; display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative; }
.mrow::before { content: ""; position: absolute; left: -1px; top: 14px; width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--tag); }
.mrow.st-hidden { opacity: .55; }
.mrow.st-pending { border-color: color-mix(in srgb, #D97706 50%, transparent); }
.mrow-main { flex: 1; min-width: 0; }
.mrow h4 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.35; overflow-wrap: anywhere; }
.mrow p { margin: 0 0 6px; color: var(--muted); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.mrow .chips { margin-bottom: 8px; }
.mrow-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 330px; }
.st { height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.st.pending { background: #FEF0D9; color: #92400E; }
.st.visible { background: #E3EEFF; color: #1E4FB0; }
.st.answered { background: #DCF5E7; color: #146C3B; }
.st.hidden { background: #ECECEE; color: #55555E; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.colorf { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.colorf input[type=color] { width: 38px; height: 38px; border: 0; border-radius: 10px; padding: 0; background: none; cursor: pointer; }
.colorf input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.colorf input[type=color]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 10px; }
.colorf b { display: block; font-size: 13px; }
.colorf small { color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch:first-of-type { border-top: 0; }
.switch b { display: block; font-size: 14px; }
.switch small { color: var(--muted); font-size: 13px; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 18%, transparent); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.logo-row { display: flex; gap: 10px; align-items: center; }
.logo-row img { height: 40px; max-width: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); padding: 4px; background: #fff; }
.tagrows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tagrow { display: flex; gap: 8px; align-items: center; }
.tagrow input[type=color] { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); cursor: pointer; flex: none; }
.tagrow input[type=text] { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); outline: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.share-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.linkrow { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.linkrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.linklabel { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.qrcard { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.preview-card { max-width: 380px; }
.poster { display: none; }
@media (max-width: 760px) {
  .form-grid, .form-grid.g4, .share-grid { grid-template-columns: 1fr; }
  .colors { grid-template-columns: 1fr; }
  .mrow { flex-direction: column; }
  .mrow-act { justify-content: flex-start; max-width: none; }
}
@media print {
  body.admin > *:not(.poster) { display: none !important; }
  .poster { display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 95vh; gap: 28px; font-family: var(--font); color: #111; }
  .poster h1 { font-size: 54px; margin: 0; letter-spacing: -.03em; }
  .poster p { font-size: 24px; margin: 0; }
  .poster .pqr { width: 380px; }
  .poster .pqr img, .poster .pqr canvas { width: 100% !important; height: auto !important; }
  .poster .purl { font-size: 22px; font-weight: 600; }
}
