* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: #fff;
  color: #111;
  font: 400 14px/1.6 Inter, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
main { max-width: 1100px; margin: auto; padding: 118px 40px 56px; }
.hero { padding-bottom: 26px; border-bottom: 1px solid #ddd; }
.hero h1, .cta h2 {
  font: 400 clamp(28px,4vw,46px)/1.15 'Playfair Display', Georgia, serif;
  margin: 10px 0 14px;
}
.hero p, .cta-description { margin: 0; max-width: 650px; color: #555; line-height: 1.7; }
.meta, .fine { color: #666; font-size: 12px; }
.meta { margin-top: 16px; }
.tag, .use b {
  font: 600 10px/1.5 Inter, Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,285px),1fr));
  gap: 48px 24px;
  padding-block: 24px 48px;
}
.card { display: flex; flex-direction: column; min-width: 0; }
.rank { display: flex; align-items: center; gap: 9px; padding: 0 0 10px; }
.rank .n {
  display: grid; place-items: center;
  width: 29px; height: 29px;
  border: 1px solid currentColor; border-radius: 50%; font-weight: 700;
}
.who { font-weight: 600; }
.stats { margin-left: auto; font-size: 11px; line-height: 1.4; text-align: right; color: #555; }
.player {
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 2/3; overflow: hidden; border-radius: 2px;
  background: #111; color: white; text-decoration: none;
}
.cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.open-video {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 11px;
  background: rgb(0 0 0 / 84%); color: white; border-radius: 999px;
  font: 600 10px/1.5 Inter, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em;
}
.player:not(:has(img)) .open-video { left: auto; bottom: auto; }
.play-video:focus-visible { outline: 3px solid white; outline-offset: -5px; }
.body { display: flex; flex-direction: column; gap: 9px; padding-top: 16px; }
.body .tag { color: #666; }
.title { margin: 0; font: 700 22px/1.2 'Playfair Display', Georgia, serif; }
.body p { margin: 0; color: #555; }
.use { padding-top: 12px; border-top: 1px solid #ddd; }
.use b { display: block; margin-bottom: 4px; }
.cta {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  border-top: 1px solid #111; padding-top: 28px;
}
.cta h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 0; }
.cta .btn { margin: 0; }
.fine { flex-basis: 100%; margin: 8px 0 0; max-width: 760px; }
.fine a { color: inherit; text-underline-offset: 3px; }
.mobile-date { display: none; }

@media (max-width:700px) {
  html.feed-ready { scroll-snap-type: y mandatory; }
  body { overflow-x: clip; }
  main { padding: 0; }
  .hero { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .grid { display: block; padding: 0; }
  .card, .cta { min-height: 100svh; scroll-snap-align: start; scroll-snap-stop: always; }
  .card { height: 100svh; position: relative; isolation: isolate; overflow: hidden; background: #080808; color: white; }
  .player { position: absolute; inset: 0; z-index: -1; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .player::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#0009,transparent 26%); }
  .open-video { z-index: 1; left: auto; bottom: auto; top: 45%; }
  .rank {
    position: absolute; top: max(74px,calc(env(safe-area-inset-top) + 68px)); left: 12px; right: 12px;
    padding: 8px 12px; color: #fff; background: rgb(0 0 0 / 72%); border-radius: 2px;
  }
  .stats, .body .tag { color: #eee; }
  .body {
    margin-top: auto; gap: 6px; padding: 48px 18px max(20px,env(safe-area-inset-bottom));
    background: linear-gradient(transparent,#000d 42px,#080808);
  }
  .title { font-size: clamp(21px,5.7vw,27px); }
  .body p, .use { font-size: clamp(12px,3.45vw,15px); line-height: 1.45; color: #eee; }
  .use { margin-top: 3px; padding-top: 7px; border-color: #666; }
  .use b { color: white; margin-bottom: 2px; }
  .cta { flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: flex-start; padding: 84px 20px 36px; }
  .fine { flex-basis: auto; }
  .mobile-date { display: block; }
  footer.vibes-footer { scroll-snap-align: end; }
  #feed-status:not([hidden]) { padding: 85px 12px 0; }
}
@media (max-width:700px) and (max-height:550px) {
  .body { padding: 10px 16px; background: #000d; gap: 3px; }
  .body p, .use { font-size: 12px; }
  .use { padding-top: 4px; }
  .title { font-size: 18px; }
}


.play-video, .player iframe {
  display: grid; place-items: center; position: absolute; inset: 0;
  width: 100%; height: 100%; padding: 0; border: 0; color: inherit; background: transparent;
}
.play-video { cursor: pointer; }
.is-playing .play-video, .close-video, .sound-video { display: none; }
.video-actions { display: flex; align-items: center; gap: 18px; }
.video-actions a, .video-actions button {
  padding: 6px 0; border: 0; background: transparent; color: inherit; cursor: pointer;
  font: 600 12px/1.4 Inter, Arial, sans-serif; text-decoration: underline; text-underline-offset: 3px;
}
.is-playing .close-video { display: inline-block; }
@media (max-width:700px) {
  .is-playing:not(.waiting-for-play) .player { position: relative; inset: auto; height: auto; min-height: 0; flex: 1; margin-top: 136px; z-index: 0; }
  .is-playing:not(.waiting-for-play) .player::after { display: none; }
  .is-playing:not(.waiting-for-play) .body { padding-top: 10px; background: #080808; }
}
@media (max-width:700px) {
  .is-playing:not(.has-sound) .sound-video, .waiting-for-play .sound-video { display: inline-block; }
  .waiting-for-play .play-video { display: grid; }
  .waiting-for-play iframe { opacity: 0; pointer-events: none; }
  .waiting-for-play .open-video { display: none; }
  .video-actions { gap: 14px; flex-wrap: wrap; }
}

@media (max-width:700px) {
  .cta { height:100svh; overflow-y:auto; justify-content:safe center; padding-bottom:12px; }
  .cta > * { flex-shrink:0; }
  .cta footer.vibes-footer { scroll-snap-align:none; }
}

/* Keep the root scrollport and full-screen cards on the same horizontal axis. */
@media (max-width:700px) {
  html, body {
    width:100%; max-width:100%; min-width:0;
    overflow-x:clip; overscroll-behavior-x:none;
  }
  main, .grid, .card, .cta {
    box-sizing:border-box; width:100%; min-width:0; max-width:100%;
  }
  .card, .cta { touch-action:pan-y pinch-zoom; }
  .body, .rank, .video-actions { min-width:0; overflow-wrap:anywhere; }
  .player, .player iframe { min-width:0; max-width:100%; touch-action:pan-y pinch-zoom; }
  .cta { overflow-x:clip; overscroll-behavior-x:none; }
}

@media (max-width:700px) {
  .rank { display:none; }
  .is-playing:not(.waiting-for-play) .player { margin-top:max(70px,calc(env(safe-area-inset-top) + 50px)); }
  /* Keep touch gestures at the side edges on the page while the centre
     remains the provider's interactive player. */
  .is-playing:not(.waiting-for-play) .player::before,
  .is-playing:not(.waiting-for-play) .player::after {
    content:''; display:block; position:absolute; top:0; bottom:0; width:16px;
    z-index:2; background:transparent; pointer-events:auto; touch-action:pan-y pinch-zoom;
  }
  .is-playing:not(.waiting-for-play) .player::before { left:0; right:auto; }
  .is-playing:not(.waiting-for-play) .player::after { left:auto; right:0; }
}

.house-ad .ad-art { background:#141414; }
.house-ad .ad-art img { width:58%; height:auto; }
.house-ad .use a { color:inherit; font-weight:600; }
@media(max-width:700px){.house-ad .ad-art{z-index:0}.house-ad .body{position:relative;z-index:1}}

@property --idea-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.card[data-video] .use { border:0; }
@keyframes idea-outline-turn { to { --idea-angle:360deg; } }
.trend-share-glyph { --trend-share-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M2%2010%2022%202l-7%2020-4-9z%20M11%2013%2022%202%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E"); }

/* Share: the gradient is on the glyph, not the 44px tap target. */
.trend-idea-row {
  display:flex; align-items:center; width:fit-content; max-width:100%;
  padding:3px 10px; margin-bottom:5px; border:2px solid transparent; border-radius:999px;
  background:linear-gradient(#171717,#171717) padding-box,
    conic-gradient(from var(--idea-angle),#5ef2ff,#4f7cff,#9b5cff,#ff5ca8,#ff8a3d,#ffd166,#5ef2ff) border-box;
}
.card[data-video] .trend-idea-row b { margin:0; color:white; }
@media(prefers-reduced-motion:no-preference) {
  .trend-idea-row { animation:idea-outline-turn 3s linear infinite; }
}
.trend-idea-description { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:10px; }
.trend-share-button {
  display:grid; place-items:center; flex:none; width:44px; height:44px;
  border:0; padding:0; background:transparent; color:white; cursor:pointer;
}
.trend-share-button:focus-visible { outline:2px solid currentColor; outline-offset:-3px; border-radius:8px; }
.trend-share-glyph {
  width:20px; height:20px;
  background:conic-gradient(from var(--idea-angle), #05778d, #456df0, #8d48e8, #d32b88, #d25422, #05778d);
  -webkit-mask:var(--trend-share-mask) center/contain no-repeat;
  mask:var(--trend-share-mask) center/contain no-repeat;
}
@media (max-width:700px) {
  .trend-share-glyph { background:conic-gradient(from var(--idea-angle), #5ef2ff, #7392ff, #ae80ff, #ff71bb, #ffd166, #5ef2ff); }
}
@media (prefers-reduced-motion:no-preference) {
  .trend-share-glyph { animation:idea-outline-turn 3s linear infinite; }
}
@media (forced-colors:active) {
  .trend-share-glyph { forced-color-adjust:none; background:ButtonText; }
}
.trend-share-dialog {
  position:fixed; inset:0; margin:auto; width:min(424px, calc(100% - 24px));
  max-height:calc(100dvh - 24px); overflow:auto; padding:24px;
  border:1px solid #745281; border-radius:20px; background:#231b29;
  color:#fff8fb; box-shadow:0 16px 48px #0008;
}
.trend-share-dialog::backdrop { background:#0d0911b3; }
.trend-share-dialog h2 { margin:0 2rem 0 0; font:700 25px/1.2 'Playfair Display',Georgia,serif; }
.trend-share-close { position:absolute; right:12px; top:12px; width:44px; height:44px; font-size:22px; }
.trend-share-title { padding:10px 12px; background:#17131b; border-radius:8px; }
.trend-share-eyebrow { color:#e0baf3; }
.trend-share-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.trend-share-options > *, .trend-share-close {
  display:grid; place-items:center; box-sizing:border-box; min-height:44px; padding:6px;
  border:1px solid #8b6a9d; border-radius:8px; background:#372840; color:white;
  text-align:center; text-decoration:none; font-family:inherit; cursor:pointer;
}
.trend-share-options > *:focus-visible, .trend-share-close:focus-visible { outline:2px solid white; }
.trend-share-brand { margin:14px 0 0; font-size:13px; color:#ecdaf3; }
.trend-share-brand a { color:inherit; text-decoration:underline; }
.trend-share-notice:not(:empty) { display:block; margin-top:10px; }
.trend-share-copy-field { width:100%; }

.ai-remake > .tag { margin:0; padding:5px 0 12px; }
.ai-media { position:relative; width:100%; }
.ai-media video { display:block; width:100%; height:auto; max-height:70svh; object-fit:contain; background:#101010; }
.ai-sound { position:absolute; bottom:8px; right:8px; min-height:44px; padding:0 14px; border:0; border-radius:24px; color:white; background:#171717e8; cursor:pointer; }
.ai-remake .body a { color:inherit; text-underline-offset:3px; }
@media(max-width:700px) {
  .ai-remake { justify-content:safe center; padding:70px 0 18px; overflow-y:auto; }
  .ai-remake > .tag { padding-inline:18px; }
  .ai-remake .body { margin-top:0; background:none; padding-top:18px; }
  .ai-remake > * { flex-shrink:0; }
}
