/* Poster tiles for movies & TV without a licensed image (tiles.js posterTile).
   Self-contained: also used by the public profile, which has no warm.css. */
.poster-tile, .poster-stage {
  --pt-a: #b5573b; --pt-b: #7e3423; --pt-ink: #fbf3e6; --pt-acc: #f2c9a0;
  position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center;
  color: var(--pt-ink);
  background:
    radial-gradient(130% 80% at 15% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(120% 90% at 100% 110%, rgba(0, 0, 0, 0.28), transparent 60%),
    linear-gradient(160deg, var(--pt-a), var(--pt-b));
}
.poster-tile { container-type: size; }
[data-pal="clay"]    { --pt-a: #b9593d; --pt-b: #7c3221; --pt-ink: #fbf3e6; --pt-acc: #f3c79c; }
[data-pal="forest"]  { --pt-a: #2f5a46; --pt-b: #13281f; --pt-ink: #f6efe2; --pt-acc: #e0916a; }
[data-pal="night"]   { --pt-a: #352f4d; --pt-b: #14111d; --pt-ink: #f1e8d8; --pt-acc: #d2b073; }
[data-pal="ink"]     { --pt-a: #2d2724; --pt-b: #0e0b0a; --pt-ink: #f0e4d1; --pt-acc: #c8573a; }
[data-pal="oxblood"] { --pt-a: #7d3127; --pt-b: #37110c; --pt-ink: #f8eadb; --pt-acc: #e6b47e; }
[data-pal="rose"]    { --pt-a: #c88674; --pt-b: #91493b; --pt-ink: #fff6ee; --pt-acc: #fde3cf; }
[data-pal="ochre"]   { --pt-a: #d8a44c; --pt-b: #a46b1d; --pt-ink: #2a1a0c; --pt-acc: #7a2e1a; }
[data-pal="paper"]   { --pt-a: #f4ead8; --pt-b: #e0cfb0; --pt-ink: #3a2418; --pt-acc: #b0442a; }
[data-pal="sage"]    { --pt-a: #6d8966; --pt-b: #3e573c; --pt-ink: #f8f2e4; --pt-acc: #f1c99f; }

/* Paper grain + a fine inset frame, like a printed one-sheet. */
.poster-tile::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poster-tile::after {
  content: ''; position: absolute; inset: 5.5cqmin; pointer-events: none; border-radius: 1.5cqmin;
  border: 1px solid color-mix(in srgb, var(--pt-ink) 22%, transparent);
  display: none;
}
.poster-tile .type-tile-initial {
  position: relative; font-family: var(--font-display, 'Instrument Serif', Georgia, serif); font-style: italic;
  font-weight: 400; line-height: 1; font-size: 58cqmin; letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
/* Thumbnail size (list rows): kicker on top, the title set small at the
   bottom left, so even a 64px tile says what it is. */
@container (max-width: 99.98px) or (max-height: 109.98px) {
.poster-tile .pt-body {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  width: 100%; height: 100%; box-sizing: border-box; padding: 9cqmin 9cqmin 10cqmin; text-align: left;
}
.poster-tile .pt-kicker {
  font: 700 max(6px, 10.5cqmin)/1 var(--font-sans, Inter, system-ui, sans-serif);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--pt-acc);
}
.poster-tile .pt-title {
  font-family: var(--font-display, 'Instrument Serif', Georgia, serif); font-weight: 400;
  font-size: max(9px, 19cqmin); line-height: 0.98; letter-spacing: -0.005em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.poster-tile[data-len="s"] .pt-title, .poster-tile[data-len="xs"] .pt-title { font-size: max(8.5px, 16cqmin); -webkit-line-clamp: 4; }
.poster-tile .pt-rule, .poster-tile .pt-meta { display: none; }
}

/* Poster layout once there is room for type (>= ~100px wide). */
@container (min-width: 100px) and (min-height: 110px) {
  .poster-tile::after { display: block; }
  .poster-tile .pt-body {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    width: 100%; height: 100%; box-sizing: border-box; padding: 13cqh 11cqw 12cqh; text-align: center; gap: 0;
  }
  .pt-kicker {
    position: absolute; top: 11cqh; left: 0; right: 0;
    font: 600 clamp(8px, 4.4cqw, 13px)/1 var(--font-sans, Inter, system-ui, sans-serif);
    letter-spacing: 0.28em; text-transform: uppercase; color: var(--pt-acc); opacity: 0.95;
  }
  .pt-title {
    font-family: var(--font-display, 'Instrument Serif', Georgia, serif); font-weight: 400;
    line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
    font-size: 17cqw;
  }
  [data-len="m"] .pt-title { font-size: 14cqw; }
  [data-len="s"] .pt-title { font-size: 11.5cqw; }
  [data-len="xs"] .pt-title { font-size: 9.5cqw; }
  .pt-rule { width: 14cqw; height: 1px; margin: 6cqh 0 4.5cqh; background: var(--pt-acc); opacity: 0.9; }
  .pt-meta {
    font: 500 clamp(9px, 4.8cqw, 15px)/1.2 var(--font-sans, Inter, system-ui, sans-serif);
    letter-spacing: 0.06em; opacity: 0.86; font-variant-numeric: lining-nums;
  }
}
/* Very wide boxes (Discover cards): keep the poster proportions readable. */
@container (min-aspect-ratio: 5/4) and (min-height: 110px) {
  .poster-tile .pt-body { padding: 10cqh 18cqw 11cqh; }
  .pt-title { font-size: min(17cqw, 22cqh); }
  [data-len="m"] .pt-title { font-size: min(14cqw, 18cqh); }
  [data-len="s"] .pt-title { font-size: min(11.5cqw, 15cqh); }
  [data-len="xs"] .pt-title { font-size: min(9.5cqw, 12cqh); }
  .pt-kicker { top: 9cqh; font-size: clamp(8px, 4cqh, 12px); }
  .pt-meta { font-size: clamp(9px, 4.6cqh, 14px); }
  .pt-rule { width: 9cqh; margin: 4.5cqh 0 3.5cqh; }
}

/* Detail-sheet hero: centred 2:3 card on a deeper stage of the same palette. */
.poster-stage { background: linear-gradient(160deg, color-mix(in srgb, var(--pt-a) 70%, #000), color-mix(in srgb, var(--pt-b) 75%, #000)); }
.poster-stage .poster-card {
  position: relative; height: 84%; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
}
.poster-stage .poster-card .poster-tile { border-radius: inherit; }

/* Light paper palette needs an edge on cream pages; dims a touch in dark mode. */
.poster-tile[data-pal="paper"] { box-shadow: inset 0 0 0 1px rgba(58, 36, 24, 0.08); }
:root[data-theme="dark"] .poster-tile[data-pal="paper"] { filter: brightness(0.9) saturate(0.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .poster-tile[data-pal="paper"] { filter: brightness(0.9) saturate(0.95); } }

/* Official Apple "Listen on" badges (unaltered SVG from Apple Services
   Marketing Tools). Clear space: >= 1/10 of the badge height on every side. */
.apple-badge { display: inline-block; padding: 6px; margin: 2px 0 0 -6px; line-height: 0; border-radius: 10px; }
.apple-badge img { display: block; height: 40px; width: auto; }
.apple-badge:focus-visible { outline: 2px solid var(--accent, #b0442a); outline-offset: 2px; }
.thumb-apple { display: block; position: absolute; inset: 0; border-radius: inherit; }
.thumb-apple img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.rs-badge { padding: 12px 20px 0; }
.iv-badge { padding: 12px 0 0; }
.rs-badge:empty, .iv-badge:empty { display: none; }
