/* ═══════════════════════════════════════════════════════════════════════════
   css/themes.css — the designed looks and the header layouts (23 Oct 2026).
   js/themes.js is the catalogue; client.js applyTheme() sets the colour
   tokens inline on body and html[data-theme]. This sheet does the rest:
     · the ART: each designed theme's background, as --art, painted once on
       a fixed body::before behind the form and again on a gallery tile
       (.th-tile[data-theme]) so the tile IS the look
     · the TYPE: --ask (the question face) and --dsp per theme
     · the BUTTONS: pill (as now) | square | pop (hard shadow) | ghost
     · the HEADER LAYOUTS: classic | hero | banner | backdrop on the welcome
       screen's identity block (client.js identityHTML)
   Loaded on client.html after client.css; the editor and the test
   dashboard load it for the tiles only.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── the art: each look's ground (--art) and ornaments are in css/themes-art.css ── */
/* painted behind the form: the html carries the flat colour (the canvas),
   body goes clear, the art sits fixed between them */
html[data-art]{background:var(--theme-bg,#131315)}
html[data-art] body:not(.view-home){background:transparent!important}
/* the gallery tile IS the look: art, the heading face, the button */
.th-tile{position:relative;aspect-ratio:1;border-radius:14px;overflow:hidden;border:1px solid rgba(20,18,16,.14);background:var(--art,var(--tb,#eee));color:var(--tf,#111);
  display:grid;grid-template-rows:1fr auto auto;gap:4px;padding:12px;text-align:left;cursor:pointer;font-family:var(--sans,Inter,sans-serif)}
.th-tile[aria-pressed="true"]{outline:2px solid var(--paper,#141210);outline-offset:2px}
.th-tile .aa{font-size:22px;line-height:1;font-family:var(--tfont,'Anton',sans-serif)}
.th-tile .bt{height:14px;border-radius:999px;background:var(--ta,#c22f2f);width:70%}
.th-tile[data-btn="square"] .bt{border-radius:2px}
.th-tile[data-btn="pop"] .bt{border-radius:3px;box-shadow:3px 3px 0 var(--tf)}
.th-tile[data-btn="ghost"] .bt{background:transparent;border:2px solid var(--ta)}
.th-tile .nm{font-size:11px;font-weight:700;color:inherit;opacity:.9;line-height:1}
.th-tile .pro{position:absolute;top:6px;right:6px;font:700 9px/1 Inter,sans-serif;letter-spacing:.1em;text-transform:uppercase;border:1px solid currentColor;border-radius:999px;padding:3px 5px;opacity:.85}

/* ── the type ─────────────────────────────────────────────────────────── */
html[data-font="playfair"]{--ask:'Playfair Display',Georgia,serif;--dsp:'Playfair Display',Georgia,serif}
html[data-font="playfair"] .h{text-transform:none;letter-spacing:-.01em;line-height:1.02;font-style:italic;font-weight:400}
html[data-font="playfair"] .idcard-name{font-style:italic;text-transform:none}
html[data-font="grotesk"]{--ask:'Space Grotesk','Inter',sans-serif;--dsp:'Space Grotesk','Inter',sans-serif}
html[data-font="grotesk"] .h{text-transform:none;letter-spacing:-.03em;font-weight:700;line-height:1}
html[data-font="grotesk"] .idcard-name,html[data-font="grotesk"] .ok{font-weight:700}
html[data-font="mono"]{--ask:'Space Mono',Menlo,monospace;--dsp:'Space Mono',Menlo,monospace}
html[data-font="mono"] .h{text-transform:uppercase;letter-spacing:.02em;font-weight:700;font-size:clamp(1.5rem,5.2vw,2.5rem);line-height:1.1}
html[data-font="bebas"]{--ask:'Bebas Neue','Anton',sans-serif;--dsp:'Bebas Neue','Anton',sans-serif}
html[data-font="bebas"] .h{letter-spacing:.03em;font-size:clamp(2.4rem,7.6vw,4rem)}

/* ── the buttons ──────────────────────────────────────────────────────── */
html[data-btn="square"] body:not(.view-home) .ok{border-radius:0;letter-spacing:.14em}
html[data-btn="pop"] body:not(.view-home) .ok{border-radius:4px;border:2px solid var(--paper);box-shadow:4px 4px 0 var(--paper);color:var(--ink)}
html[data-btn="pop"] body:not(.view-home) .ok:hover:not(:disabled){transform:translate(2px,2px);box-shadow:2px 2px 0 var(--paper)}
html[data-btn="ghost"] body:not(.view-home) .ok{background:transparent;color:var(--red);border:2px solid var(--red)}
html[data-btn="ghost"] body:not(.view-home) .ok:hover:not(:disabled){background:var(--red);color:var(--ink)}

/* ── the header layouts (Pro; classic is Free's circle) ───────────────── */
.idcard.l-hero{gap:.6rem}
.idcard.l-hero .idcard-ring{width:100%;max-width:420px;height:260px;border-radius:18px;border:0;background:var(--ink3);
  -webkit-mask-image:linear-gradient(to bottom,#000 55%,transparent 100%);mask-image:linear-gradient(to bottom,#000 55%,transparent 100%)}
.idcard.l-hero .idcard-name{margin-top:-2.2rem;font-size:2.6rem;position:relative;text-shadow:0 2px 18px rgba(0,0,0,.35)}
.idcard.l-banner .idcard-banner{width:100%;max-width:420px;height:120px;border-radius:16px;overflow:hidden;background:var(--ink3)}
.idcard.l-banner .idcard-banner img{width:100%;height:100%;object-fit:cover;display:block}
.idcard.l-banner .idcard-ring{margin-top:-66px;width:112px;height:112px;background:var(--ink)}
body.hdr-backdrop .screen .pic{display:none}
body.hdr-backdrop .screen.split{grid-template-columns:1fr}
body.hdr-backdrop::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--backdrop) center/cover no-repeat}
body.hdr-backdrop::before{display:none}
body.hdr-backdrop .ask{background:linear-gradient(to bottom,rgba(0,0,0,.25),rgba(0,0,0,.65))}
body.hdr-backdrop,body.hdr-backdrop .h,body.hdr-backdrop .sub,body.hdr-backdrop .idcard-name{color:#fff}
body.hdr-backdrop .idcard-handle{color:rgba(255,255,255,.75)}
body.hdr-backdrop .idcard-ring{border-color:#fff}

/* ── Pro, 18 Nov 2026: the header photo's placement and zoom, and the ring's
   colour. js/client.js paintBrandVars() sets --ph-x / --ph-y / --ph-z and
   --ring-c on body; unset, the photo is centred at its own size and the
   ring is the look's. The hero layout has no ring to colour. ── */
.idcard.l-hero .idcard-ring img,.idcard.l-banner .idcard-banner img{
  object-position:var(--ph-x,50%) var(--ph-y,50%);transform:scale(var(--ph-z,1));transform-origin:var(--ph-x,50%) var(--ph-y,50%)}
.idcard.l-banner .idcard-ring{position:relative}
body.hdr-backdrop::after{background-position:var(--ph-x,50%) var(--ph-y,50%);transform:scale(var(--ph-z,1));transform-origin:var(--ph-x,50%) var(--ph-y,50%)}
body.has-ring .idcard-ring,body.has-ring.hdr-backdrop .idcard-ring{border-color:var(--ring-c)}

/* ── 18 Nov 2026: three more headers, and two switches for any of them ── */
.idcard.l-square .idcard-ring{width:150px;height:150px;border-radius:22%}
.idcard.l-poster{gap:.9rem}
.idcard.l-poster .idcard-ring{width:100%;max-width:420px;height:320px;border-radius:18px;border:0;background:var(--ink3)}
.idcard.l-polaroid{gap:1.1rem}
.idcard.l-polaroid .idcard-ring{width:210px;height:250px;border-radius:4px;border:10px solid #fff;border-bottom-width:40px;background:#fff;
  transform:rotate(-3deg);box-shadow:0 16px 30px -14px rgba(0,0,0,.55)}
.idcard.l-poster .idcard-ring img,.idcard.l-polaroid .idcard-ring img{
  object-position:var(--ph-x,50%) var(--ph-y,50%);transform:scale(var(--ph-z,1));transform-origin:var(--ph-x,50%) var(--ph-y,50%)}
.idcard.l-polaroid .idcard-ring{overflow:hidden}
body.has-ring .idcard.l-polaroid .idcard-ring{border-color:var(--ring-c)}
/* the fade on the Hero photo, off */
body.hdr-nofade .idcard.l-hero .idcard-ring{-webkit-mask-image:none;mask-image:none}
body.hdr-nofade .idcard.l-hero .idcard-name{margin-top:.2rem;text-shadow:none}
/* the opening screen set to the left instead of centred */
body.hdr-left.is-welcome .idcard{align-items:flex-start;text-align:left}
body.hdr-left.is-welcome .ask .inner,body.hdr-left.is-welcome .ask .inner > .h,body.hdr-left.is-welcome .ask .inner > .sub{text-align:left;margin-left:0}
body.hdr-left.is-welcome .ask .inner > div:has(> .ok){justify-content:flex-start}
