/* ============================================================
   DESIGN CARDS
   Shared by the Studio's picker and the public collections
   page, so a design cannot look like one thing on the shelf
   and another inside the editor.
   ============================================================ */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.tpl-card {
  display: block; text-align: start; cursor: pointer; padding: 0;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 11px; overflow: hidden; transition: border-color .2s, transform .2s;
}
.tpl-card:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.tpl-card.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.tpl-card__art { position: relative; display: block; height: 128px; overflow: hidden; }
/* Half strength: at theme-card size the pattern is texture, at this size
   it competes with the three bars that carry the whole thumbnail. */
.tpl-card__art .theme-card__pattern { position: absolute; inset: 0; opacity: .45; }
.tpl-card__motif {
  position: absolute; left: 50%; top: 15px; transform: translateX(-50%);
  width: 28px; height: 28px; fill: none; stroke-width: 1.5; opacity: 1; z-index: 1;
}
/* The type is abstracted to three bars: the invitation line, the names,
   and the closing. Their size and alignment is what tells the layouts
   apart at this size - not the label underneath. */
.tpl-card__type {
  position: absolute; inset: 0; z-index: 2;
  display: grid; align-content: center; justify-items: center; gap: 5px;
}
.tpl-card__type i { display: block; border-radius: 2px; background: var(--l); }
.tpl-card__type .t1 { width: 46px; height: 3px; opacity: .42; }
.tpl-card__type .t2 { width: 72px; height: 9px; opacity: .92; }
.tpl-card__type .t3 { width: 34px; height: 4px; background: var(--a); opacity: 1; }

.tpl-card__art--classic .tpl-card__type { padding-top: 32px; }

.tpl-card__art--monogram .tpl-card__motif { width: 42px; height: 42px; top: 20px; }
.tpl-card__art--monogram .tpl-card__type { padding-top: 56px; }

/* editorial: no emblem at all, names set huge and hard left */
.tpl-card__art--editorial .tpl-card__motif { display: none; }
.tpl-card__art--editorial .tpl-card__type {
  justify-items: start; padding-inline-start: 16px; gap: 7px;
}
.tpl-card__art--editorial .t1 { width: 62px; }
.tpl-card__art--editorial .t2 { width: 86px; height: 14px; }

.tpl-card__art--framed::after {
  content: ""; position: absolute; inset: 9px;
  border: 1px solid var(--a); opacity: .45; border-radius: 3px;
}
.tpl-card__art--framed .tpl-card__type { padding-top: 30px; }

/* arch: the doorway, drawn with one rounded border */
.tpl-card__art--arch::after {
  content: ""; position: absolute; inset: 11px 24px -1px;
  border: 1px solid var(--a); border-bottom: 0; opacity: .6;
  border-radius: 50% 50% 0 0 / 32% 32% 0 0;
}
.tpl-card__art--arch .tpl-card__motif { top: 30px; width: 20px; height: 20px; }
.tpl-card__art--arch .tpl-card__type { padding-top: 40px; }
.tpl-card__art--arch .t2 { width: 60px; }

/* veil: light ground, left aligned, emblem pushed into a corner */
.tpl-card__art--veil .tpl-card__motif {
  left: auto; inset-inline-end: 12px; top: 12px; transform: none;
  width: 20px; height: 20px; opacity: .6;
}
.tpl-card__art--veil .tpl-card__type {
  justify-items: start; padding-inline-start: 16px; gap: 6px;
}
.tpl-card__art--veil .t2 { width: 76px; }

/* banner: a ruled panel across the middle carries the names */
.tpl-card__art--banner::after {
  content: ""; position: absolute; inset-inline: 0; top: 50%;
  transform: translateY(-50%); height: 36px;
  background: rgba(0, 0, 0, .22);
  border-block: 1px solid var(--a); opacity: .65;
}
.tpl-card__art--banner .tpl-card__motif { top: 10px; width: 20px; height: 20px; }
.tpl-card__art--banner .tpl-card__type { padding-top: 26px; }

.tpl-card__meta { display: block; padding: 10px 12px 12px; }
.tpl-card__meta b { display: block; font-size: 13px; color: var(--text); font-weight: 600; }
.tpl-card__meta span {
  display: block; margin-top: 3px; font-size: 11px;
  line-height: 1.5; color: var(--muted);
}
.tpl-card.is-active .tpl-card__meta b { color: var(--gold); }


/* A scene thumbnail is the real drawing, scaled down. */
.tpl-card__art--scene { background: #1b1233; }
.tpl-card__scene { width: 100%; height: 100%; display: block; }

/* ---------- concepts: draw the shape, not the palette ---------- */
.tpl-chat { position: absolute; inset: 0; display: block; }
.tpl-chat i { position: absolute; display: block; border-radius: 7px; }
.tpl-chat__bar { inset: 0 0 auto; height: 18px; border-radius: 0 !important; background: color-mix(in srgb, var(--l) 14%, transparent); }
.tpl-chat__b { left: 10px; height: 14px; background: var(--l); opacity: .92; border-top-left-radius: 2px !important; }
.tpl-chat__b--1 { top: 28px; width: 46%; }
.tpl-chat__b--2 { top: 48px; width: 62%; height: 22px; background: color-mix(in srgb, var(--a) 40%, var(--l)); }
.tpl-chat__b--3 { top: 76px; width: 38%; }
.tpl-chat__b--me { top: 98px; left: auto; right: 10px; width: 44%; background: var(--a); border-top-left-radius: 7px !important; border-top-right-radius: 2px !important; }

.tpl-ticket { position: absolute; left: 50%; top: 12px; bottom: 12px; width: 56%; translate: -50% 0; display: block; background: var(--l); border-radius: 8px; overflow: hidden; }
.tpl-ticket i { position: absolute; display: block; }
.tpl-ticket__head { inset: 0 0 auto; height: 16px; background: color-mix(in srgb, var(--a) 70%, #000); }
.tpl-ticket__codes { position: absolute; top: 24px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--a); }
.tpl-ticket__line { left: 12%; right: 12%; top: 50px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--a) 45%, var(--l)); }
.tpl-ticket__line--2 { top: 62px; right: 34%; }
.tpl-ticket__perf { left: 6px; right: 6px; top: 78px; border-top: 2px dashed color-mix(in srgb, #000 22%, transparent); }
.tpl-ticket__bars { left: 12%; right: 30%; bottom: 8px; height: 14px; background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px); }
.tpl-rail { position: absolute; inset: 0; display: block; }
.tpl-rail__board { position: absolute; top: 24px; left: 50%; translate: -50% 0; display: flex; gap: 2px; padding: 6px; background: #121416; border-radius: 4px; }
.tpl-rail__board i { width: 10px; height: 14px; border-radius: 2px; background: linear-gradient(#2a2d31 50%, #1c1e21 50%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.tpl-rail__board i:nth-child(odd) { background: linear-gradient(#ffc24a 50%, #e0a730 50%); opacity: .9; }
.tpl-rail i { position: absolute; display: block; }
.tpl-rail__track { left: 0; right: 0; bottom: 22px; height: 8px; border-top: 2px solid var(--a); border-bottom: 2px solid var(--a); opacity: .6; }
.tpl-rail__train { left: 30%; bottom: 30px; width: 44%; height: 20px; border-radius: 8px 12px 4px 4px; background: var(--a); }
.tpl-book { position: absolute; inset: 0; display: block; perspective: 300px; }
.tpl-book i { position: absolute; display: block; }
.tpl-book__page { left: 26%; right: 22%; top: 16px; bottom: 16px; border-radius: 2px 6px 6px 2px; background: color-mix(in srgb, var(--l) 92%, var(--a)); }
.tpl-book__cover { left: 26%; right: 22%; top: 16px; bottom: 16px; border-radius: 2px 6px 6px 2px; background: color-mix(in srgb, var(--a) 18%, #000); transform-origin: left center; transform: rotateY(-38deg); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--a) 60%, transparent); }
.tpl-book__title { left: 36%; width: 22%; top: 52px; height: 5px; border-radius: 3px; background: var(--a); transform-origin: left; transform: perspective(300px) rotateY(-38deg) translateX(4px); }

/* ---------- tier and price ---------- */
.tpl-card { position: relative; }
.tpl-card__tier {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(10, 14, 12, .72);
  color: #f0f4f1;
  backdrop-filter: blur(6px);
}
.tpl-card__tier--modern { background: rgba(37, 52, 92, .85); color: #dfe7ff; }
.tpl-card__tier--premium { background: linear-gradient(120deg, #e8cf8f, #b8893a); color: #1d1408; }
.tpl-card__meta .tpl-card__price { display: flex; align-items: baseline; gap: 7px; margin: 3px 0 4px; font-size: 13px; color: var(--text); }
.tpl-card__price strong { font-weight: 700; }
.tpl-card__price s { font-size: 11px; color: var(--muted); }

.tpl-card__tier--luxe { background: #120d10; color: #e6cf95; box-shadow: inset 0 0 0 1px rgba(230, 207, 149, .5); }

.tpl-vinyl { position: absolute; inset: 0; display: block; }
.tpl-vinyl i { position: absolute; display: block; }
.tpl-vinyl__disc { top: 22px; left: 42%; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, var(--a) 0 22%, #111 23% 100%), repeating-radial-gradient(circle, #1a1a1a 0 1px, #0b0b0b 1px 3px); box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.tpl-vinyl__sleeve { top: 18px; left: 16%; width: 88px; height: 88px; border-radius: 3px; background: linear-gradient(135deg, var(--l) 55%, var(--a) 55%); box-shadow: 0 8px 16px rgba(0,0,0,.35); }

.tpl-scrap { position: absolute; inset: 0; display: block; background: #f6efdf; }
.tpl-scrap i { position: absolute; display: block; }
.tpl-scrap__pol { width: 54px; height: 64px; background: #fff; border: 5px solid #fff; border-bottom-width: 14px; box-shadow: 0 4px 8px rgba(0,0,0,.18); }
.tpl-scrap__pol::after { content: ""; position: absolute; inset: 0; background: var(--a); opacity: .55; }
.tpl-scrap__pol--a { top: 20px; left: 18%; transform: rotate(-8deg); }
.tpl-scrap__pol--b { top: 34px; left: 48%; transform: rotate(6deg); }
.tpl-scrap__note { top: 70px; left: 26%; width: 46px; height: 40px; background: #fff2a8; transform: rotate(4deg); box-shadow: 0 3px 6px rgba(0,0,0,.15); }
.tpl-scrap__tape { top: 14px; left: 30%; width: 34px; height: 10px; background: var(--a); opacity: .7; transform: rotate(-12deg); }

.tpl-stars { position: absolute; inset: 0; display: block; background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.08), transparent 60%), #05070f; }
.tpl-stars i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px rgba(255,255,255,.7); }
.tpl-stars i:nth-child(1) { left: 12%; top: 70%; }
.tpl-stars i:nth-child(2) { left: 34%; top: 32%; }
.tpl-stars i:nth-child(3) { left: 56%; top: 55%; }
.tpl-stars i:nth-child(4) { left: 80%; top: 22%; background: var(--a); }
.tpl-stars i:nth-child(5) { left: 90%; top: 64%; }
.tpl-stars svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tpl-stars path { fill: none; stroke: var(--a); stroke-width: .6; opacity: .7; vector-effect: non-scaling-stroke; }

.tpl-ex { position: absolute; inset: 0; display: block; background: #efe9df; }
.tpl-ex i { position: absolute; display: block; }
.tpl-ex__spot { inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(255, 240, 200, .9), transparent 70%); }
.tpl-ex__frame { top: 26px; left: 30%; width: 40%; height: 64px; border: 6px solid var(--a); background: linear-gradient(135deg, #2b2b2b, #5a5148); box-shadow: 0 8px 12px -6px rgba(0,0,0,.5); }
.tpl-ex__frame--b { top: 96px; left: 40%; width: 20%; height: 8px; border: 0; background: #fbf8f2; box-shadow: none; }
.tpl-ex__floor { left: 0; right: 0; bottom: 0; height: 12px; background: #2a231d; }

/* note: the Save the Date - a small paper card on the theme's colour */
.tpl-card__art--note { display: grid; place-items: center; }
.tpl-note {
  display: grid; justify-items: center; gap: 6px;
  width: 58%; padding: 12px 8px 10px;
  border-radius: 8px; background: var(--card);
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .7);
}
.tpl-note__motif { width: 22px; height: 22px; fill: none; stroke: var(--a); stroke-width: 1.6; }
.tpl-note i { display: block; border-radius: 2px; }
.tpl-note .t1 { width: 60%; height: 3px; background: var(--l); opacity: .4; }
.tpl-note__date { width: 74%; height: 8px; background: var(--l); opacity: .9; }
.tpl-note .t3 { width: 40%; height: 3px; background: var(--a); }
.shop .tpl-card__art--note .tpl-note { scale: 1.25; }
