/* ════════════════════════════════════════════════════════════
   Home — the public kuizzes (/home). Loaded after styles.css.

   One reader: someone deciding what to play tonight. The page leads with a
   big spotlight (the featured kuizzes, one at a time), then categories, then
   two shelves (ours, the community's), then everything with search. Every
   cover is drawn from our own sticker art on a tint — no photos, so the page
   works with no internet (Hotspot Mode) like the rest of the app.
   ════════════════════════════════════════════════════════════ */

/* Cover tints: --t1 is the glow, --t2 the deep end of the gradient. */
[data-tint="pink"]   { --t1: #f0479b; --t2: #6d1a4c; }
[data-tint="orange"] { --t1: #ff7a1c; --t2: #7c2a0b; }
[data-tint="cyan"]   { --t1: #00c8d6; --t2: #0b4566; }
[data-tint="green"]  { --t1: #3fcf6a; --t2: #0e5236; }
[data-tint="purple"] { --t1: #9b5cf6; --t2: #351b70; }
[data-tint="red"]    { --t1: #f04848; --t2: #64101f; }
[data-tint="gold"]   { --t1: #ffb020; --t2: #7a4106; }
[data-tint="blue"]   { --t1: #3b82f6; --t2: #15265a; }

.hm-cover {
  background:
    radial-gradient(rgba(255, 255, 255, 0.13) 1.4px, transparent 1.6px) 0 0 / 15px 15px,
    radial-gradient(130% 120% at 85% 0%, var(--t1) 0%, var(--t2) 72%);
}

@keyframes hm-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hm-bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}
@keyframes hm-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ─── Top bar ─── */
.hm-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 25, 43, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bg-glass-border);
}
.hm-top-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 20px;
}
.hm-logo img { display: block; width: 122px; height: auto; }
.hm-nav { display: flex; gap: 4px; }
.hm-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: var(--radius-full);
}
.hm-nav a:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.hm-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hm-join {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  padding: 3px 3px 3px 14px;
}
.hm-join input {
  width: 92px;
  background: none;
  border: 0;
  color: var(--text-primary);
  font: 600 0.95rem var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hm-join input::placeholder { color: var(--text-muted); letter-spacing: 0.02em; text-transform: none; }
.hm-join input:focus { outline: none; }
.hm-join:focus-within { border-color: var(--accent-light); }
.hm-join button {
  border: 0;
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  font: 700 0.85rem var(--font-heading);
  padding: 7px 12px;
  cursor: pointer;
}
.hm-join button:hover { background: var(--accent); }
.hm-top .btn { padding: 9px 18px; font-size: 0.95rem; --btn-lift: 3px; }
.hm-session { display: flex; gap: 8px; min-width: 0; }

/* ─── Page ─── */
.hm {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 40px) 64px;
  display: grid;
  gap: 72px;
}
.hm-section { display: grid; gap: 20px; min-width: 0; }
.hm-section-head { display: flex; align-items: end; gap: 12px 20px; flex-wrap: wrap; }
.hm-section-head h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.hm-section-head p { color: var(--text-secondary); font-size: 0.98rem; }
.hm-section-head .hm-head-text { display: grid; gap: 4px; }
.hm-section-head .hm-head-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hm-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
}

/* ─── Intro + search ─── */
.hm-intro { display: grid; gap: 18px; justify-items: start; }
.hm-intro h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hm-intro h1 em {
  font-style: normal;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hm-search {
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 2px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  padding: 6px 6px 6px 20px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.hm-search:focus-within { border-color: var(--accent-light); }
.hm-search > svg, .hm-search > i { color: var(--text-muted); flex-shrink: 0; }
.hm-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--text-primary);
  font: 500 1.05rem var(--font-body);
  padding: 10px 0;
}
.hm-search input:focus { outline: none; }
.hm-search input::placeholder { color: var(--text-muted); }
.hm-search .btn { padding: 10px 22px; --btn-lift: 3px; }

/* ─── Spotlight ─── */
.hm-spot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
.hm-spot-main {
  position: relative;
  min-height: 430px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.4), var(--shadow-xl);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
}
.hm-spot-copy {
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  gap: 16px;
  justify-items: start;
  animation: hm-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.hm-spot-copy h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.hm-spot-copy p { font-size: 1.06rem; color: rgba(255, 255, 255, 0.86); max-width: 32em; }
.hm-spot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 0.78rem var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-full);
  padding: 5px 12px;
}
.hm-spot-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hm-spot-actions .btn-outline { background: rgba(0, 0, 0, 0.22); }
.hm-spot-art {
  position: relative;
  height: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
}
.hm-spot-art img {
  width: min(78%, 330px);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
  --r: 6deg;
  animation: hm-rise 0.55s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) backwards, hm-bob 6s 0.6s ease-in-out infinite;
}
.hm-spot-art::before {
  content: '';
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
}

.hm-spot-list { display: grid; gap: 10px; align-content: start; }
.hm-spot-thumb {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
}
.hm-spot-thumb:hover { background: var(--bg-card-hover); }
.hm-spot-thumb[aria-current="true"] { border-color: var(--t1); background: var(--bg-card-hover); }
.hm-spot-thumb .hm-thumb-art {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.hm-spot-thumb .hm-thumb-art img { width: 46px; height: 46px; }
.hm-spot-thumb b { font: 700 0.98rem/1.2 var(--font-heading); display: block; }
.hm-spot-thumb small { color: var(--text-secondary); font-size: 0.8rem; }
.hm-spot-thumb .hm-thumb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--t1);
  transform-origin: left;
  transform: scaleX(0);
}
.hm-spot-thumb[aria-current="true"] .hm-thumb-bar.running { animation: hm-fill var(--spot-ms, 7000ms) linear forwards; }

/* ─── Categories ─── */
.hm-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.hm-cat {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  min-height: 118px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}
.hm-cat:hover { transform: translateY(-3px) rotate(-0.6deg); box-shadow: 0 7px 0 rgba(0, 0, 0, 0.35); }
.hm-cat:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.hm-cat:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; }
.hm-cat[aria-pressed="true"] { border-color: #fff; }
.hm-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.28);
}
.hm-cat-icon svg { width: 24px; height: 24px; }
.hm-cat b { font: 800 1.02rem/1.15 var(--font-heading); }
.hm-cat small { font-size: 0.8rem; color: rgba(255, 255, 255, 0.78); margin-top: -6px; }
.hm-cat--all { background: var(--bg-secondary); }

/* ─── Shelves ─── */
.hm-shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 280px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 4px 14px;
  margin: -4px -4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-glass-border) transparent;
}
.hm-shelf > * { scroll-snap-align: start; }
.hm-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hm-arrow:hover { background: var(--bg-card-hover); }
.hm-arrow svg { width: 20px; height: 20px; }

/* ─── Kuiz card ─── */
.hm-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--bg-glass-border);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: hm-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.hm-card:hover, .hm-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--t1);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35), 0 20px 40px -18px var(--t1);
}
.hm-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hm-card-cover img {
  width: 46%;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
  transform: rotate(var(--r, -5deg));
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.hm-card:hover .hm-card-cover img { transform: rotate(0deg) scale(1.08); }
.hm-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font: 700 0.72rem var(--font-heading);
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}
.hm-badge--right { left: auto; right: 10px; display: inline-flex; gap: 4px; align-items: center; }
.hm-badge svg { width: 12px; height: 12px; }
.hm-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.hm-card-body h3 { font: 800 1.12rem/1.2 var(--font-heading); letter-spacing: -0.01em; }
.hm-by { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-secondary); }
.hm-by--official { color: var(--accent-light); font-weight: 600; }
.hm-by svg { width: 14px; height: 14px; }
.hm-sample {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--bg-glass-border);
  border-radius: 4px;
  padding: 0 5px;
}
.hm-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.hm-meta span { display: inline-flex; align-items: center; gap: 4px; }
.hm-meta svg { width: 13px; height: 13px; }
/* The whole card opens the preview; the Preview + Host buttons sit above that layer. */
.hm-card-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: inherit;
}
.hm-card-open:focus-visible { outline: 3px solid var(--accent-light); outline-offset: -3px; }
.hm-card-actions {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.hm-card-actions .btn { padding: 6px 14px; font-size: 0.85rem; --btn-lift: 3px; }
/* Readable on any cover picture, bright or dark. */
.hm-card-actions .btn-outline { background: rgba(10, 14, 28, 0.72); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.hm-card-actions .btn-outline:hover { background: rgba(10, 14, 28, 0.9); }
.hm-card-actions svg { width: 14px; height: 14px; }
.hm-card:hover .hm-card-actions, .hm-card:focus-within .hm-card-actions { opacity: 1; transform: none; }
@media (hover: none) { .hm-card-actions { opacity: 1; transform: none; } }

/* ─── Browse ─── */
.hm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
}
.hm-chip:hover { background: var(--bg-card-hover); }
.hm-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.hm-chip svg { width: 14px; height: 14px; }
.hm-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  font: 600 0.88rem var(--font-body);
}
.hm-select option { background: var(--bg-secondary); }
.hm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.hm-count { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.hm-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 16px;
  text-align: center;
  color: var(--text-secondary);
  border: 2px dashed var(--bg-glass-border);
  border-radius: var(--radius-lg);
}
.hm-empty img { width: 84px; height: 84px; }

/* ─── Build-your-own band ─── */
.hm-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.hm-cta h2 { font: 800 clamp(1.6rem, 3.4vw, 2.4rem)/1.05 var(--font-heading); letter-spacing: -0.02em; }
.hm-cta p { color: rgba(255, 255, 255, 0.85); margin-top: 8px; max-width: 34em; }
.hm-cta .btn { margin-top: 18px; }
.hm-cta-art { display: flex; align-items: center; }
.hm-cta-art img { width: 120px; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4)); animation: hm-bob 5s ease-in-out infinite; }
.hm-cta-art img:nth-child(1) { --r: -10deg; margin-right: -22px; animation-delay: -1s; }
.hm-cta-art img:nth-child(2) { --r: 4deg; width: 150px; position: relative; z-index: 1; }
.hm-cta-art img:nth-child(3) { --r: 12deg; margin-left: -22px; animation-delay: -2.5s; }

.hm-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 40px) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--bg-glass-border);
}
.hm-foot a { color: var(--text-secondary); text-decoration: none; }
.hm-foot a:hover { color: var(--text-primary); }
.hm-foot span:first-child { margin-right: auto; }

/* ─── Preview dialog ─── */
.hm-preview {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  overflow: auto;
}
.hm-preview::backdrop { background: rgba(8, 11, 22, 0.72); backdrop-filter: blur(4px); }
.hm-preview[open] { animation: hm-rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hm-pv-cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: end;
  padding: 28px 28px 24px;
  min-height: 190px;
}
.hm-pv-cover h2 { font: 800 clamp(1.6rem, 4vw, 2.3rem)/1.05 var(--font-heading); letter-spacing: -0.02em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.hm-pv-cover img { width: 150px; height: auto; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45)); transform: rotate(6deg); align-self: center; }
.hm-pv-cover .hm-by { color: rgba(255, 255, 255, 0.85); margin-top: 8px; }
.hm-pv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1;
}
.hm-pv-close:hover { background: rgba(0, 0, 0, 0.55); }
.hm-pv-close svg { width: 20px; height: 20px; }
.hm-pv-body { padding: 22px 28px 28px; display: grid; gap: 22px; }
.hm-pv-body > p { color: var(--text-secondary); font-size: 1.02rem; }
.hm-pv-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.86rem;
  font-weight: 600;
}
.hm-pill svg { width: 15px; height: 15px; }
.hm-pill--kaos { color: #ff9f1c; }
.hm-pill--pop { color: var(--accent-light); }
.hm-pv-body h3 { font: 700 0.78rem var(--font-heading); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.hm-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
/* The type logos are wordmarks ("Multiple Choice!"), so they get the tile's width. */
.hm-type {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 12px 10px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  text-align: center;
}
.hm-type img { width: 100%; height: 46px; object-fit: contain; }
.hm-type span { font-size: 0.8rem; color: var(--text-secondary); }
.hm-type b { color: var(--text-primary); font-weight: 700; }
.hm-samples { display: grid; gap: 8px; list-style: none; }
.hm-samples li {
  background: var(--bg-card);
  border-left: 3px solid var(--t1, var(--accent));
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 500;
}
.hm-pv-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hm-pv-note { color: var(--text-muted); font-size: 0.82rem; flex-basis: 100%; }

/* ─── Toast (this page has no socket-client.js) ─── */
.hm-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--bg-secondary);
  border: 2px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  animation: hm-rise 0.25s ease;
}
.hm-toast[data-type="error"] { border-color: var(--incorrect); }

/* ─── Picture covers ───
   What a host's uploaded picture will look like: it fills the cover edge to
   edge (object-fit: cover, so any shape works), a scrim keeps the badges and
   titles readable on a bright photo, and the tint underneath shows while it
   loads. The sticker art is hidden behind it and comes back if it fails. */
.hm-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.has-photo .hm-art { visibility: hidden; }

.hm-card-cover .hm-photo { width: 100%; height: 100%; transform: none; filter: none; transition: transform 0.4s ease; }
.hm-card:hover .hm-card-cover .hm-photo { transform: scale(1.06); }
.hm-card-cover.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}
.hm-badge { z-index: 2; }

.hm-thumb-art { position: relative; overflow: hidden; }
.hm-spot-thumb .hm-thumb-art .hm-photo { width: 100%; height: 100%; }

/* Spotlight: the picture is the whole banner; a tinted scrim from the left
   carries the text. */
.hm-spot-photo { z-index: -2; }
.hm-spot-main.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--t2) 94%, #000) 0%,
      color-mix(in srgb, var(--t2) 78%, transparent) 38%,
      transparent 70%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 40%);
}
.hm-spot-main.has-photo .hm-spot-art img,
.hm-spot-main.has-photo .hm-spot-art::before { display: none; }

.hm-pv-cover .hm-photo { width: 100%; height: 100%; transform: none; filter: none; }
.hm-pv-cover.has-photo { min-height: 260px; }
.hm-pv-cover.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, color-mix(in srgb, var(--t2) 92%, #000) 0%, color-mix(in srgb, var(--t2) 55%, transparent) 45%, rgba(0, 0, 0, 0.25) 100%);
}
.hm-pv-cover > div { position: relative; z-index: 2; }
.hm-pv-close { z-index: 3; }
.hm-credit { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Small screens ─── */
@media (max-width: 960px) {
  .hm-spot { grid-template-columns: minmax(0, 1fr); }
  .hm-spot-list { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; padding-bottom: 6px; }
  .hm-nav { display: none; }
}
@media (max-width: 680px) {
  .hm { gap: 52px; padding-top: 24px; }
  .hm-spot-main { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hm-spot-art { order: -1; min-height: 0; padding-top: 24px; }
  .hm-spot-art img { width: 150px; }
  .hm-spot-main.has-photo .hm-spot-art { min-height: 190px; }
  .hm-spot-main.has-photo::before {
    background: linear-gradient(0deg,
      color-mix(in srgb, var(--t2) 94%, #000) 0%,
      color-mix(in srgb, var(--t2) 72%, transparent) 50%,
      transparent 72%);
  }
  .hm-spot-copy { padding-top: 8px; }
  .hm-join { display: none; }
  /* Both stay: signed out it's Log in + Get an invite, signed in Log out + My kuizzes. */
  .hm-top .hm-session .btn { padding: 8px 12px; font-size: 0.85rem; }
  .hm-logo img { width: 104px; }
  .hm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-cta { grid-template-columns: minmax(0, 1fr); }
  .hm-cta-art { justify-content: center; order: -1; }
  .hm-cta-art img { width: 84px; }
  .hm-cta-art img:nth-child(2) { width: 104px; }
  .hm-pv-cover { grid-template-columns: minmax(0, 1fr) 90px; padding: 22px 18px 18px; }
  .hm-pv-cover img { width: 90px; }
  .hm-pv-body { padding: 18px; }
  .hm-section-head .hm-head-tools { margin-left: 0; }
  .hm-search .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-spot-copy, .hm-spot-art img, .hm-card, .hm-cta-art img, .hm-preview[open] { animation: none !important; }
  .hm-spot-thumb .hm-thumb-bar.running { animation: none; }
}
