/* Script cards and the script detail page (rscripts / scriptblox structure, RDR2 look).
   Red-graded art, framed translucent panels over a faint art backdrop, flat chips. Red, black, white and silver only.
   The card fills whatever cell its grid gives it; listing grid columns belong to the listing page.
   Motion is transform/opacity only; glow pulses keep running under reduced motion (user request). */

@keyframes bd-glow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Tag chips */
.st-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 2px; color: var(--silver); font: 700 10.5px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.st-official { border-color: #c8111b; background: #c8111b; color: #fff; }
.st-verified { border-color: #c8111b; color: #fff; }
.st-verified::before { content: ""; width: 9px; height: 5px; border: solid var(--red-hot); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.st-keyless { border-color: #f4f4f6; background: #f4f4f6; color: #0b0b0d; }
.st-key { color: #dcdce0; }
.st-universal { background: rgba(201, 201, 207, .14); color: #fff; }
.st-mobile { color: #fff; }
.st-online { color: #fff; }
.st-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red-hot); box-shadow: 0 0 8px var(--red-glow); animation: bd-glow 2s ease-in-out infinite; }
.st-offline, .st-patched { border-color: rgba(255, 255, 255, .14); color: var(--dim); }
.st-patched { text-decoration: line-through; }

/* Card: RDR2 "Latest trailers & media". No box; red-graded art, round play button, title, red genre label. */
.script-card { position: relative; display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; margin: 0; padding-bottom: 14px; color: #fff; }
.script-card:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.scard-media { position: relative; isolation: isolate; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0e0e11; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.scard-media > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
/* The art keeps the game icon's own colours (user). Only a light top/bottom shade so the marks, play button and run count stay readable. */
.scard-media::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 7, 8, .38), transparent 30%), linear-gradient(0deg, rgba(7, 7, 8, .62), transparent 38%); pointer-events: none; }
.scard-media > img.is-fallback { padding: 20% 34% 12%; object-fit: contain; filter: none; }
.script-card:hover .scard-media > img:not(.is-fallback) { transform: scale(1.06); }
.scard-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #fff; border-radius: 50%; background: rgba(7, 7, 8, .45); translate: -50% -50%; transition: scale .3s var(--ease); }
.scard-play::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .25s; }
.scard-play svg { position: relative; width: 22px; height: 22px; margin-left: 3px; fill: #fff; stroke: none; transition: fill .25s; }
.script-card:hover .scard-play { scale: 1.08; }
.script-card:hover .scard-play::before { opacity: 1; }
.script-card:hover .scard-play svg { fill: #070708; }
.scard-marks { position: absolute; z-index: 2; top: 8px; left: 10px; right: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scard-marks .mark-online { height: 30px; max-width: 46%; object-fit: contain; }
.scard-marks .mark-hot { height: 28px; max-width: 42%; margin-left: auto; object-fit: contain; }
.scard-marks .mark-offline { font-size: 14px; }
.scard-runs { position: absolute; z-index: 2; right: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; color: #fff; font: 700 13px/1 var(--display); letter-spacing: .03em; text-shadow: 0 1px 6px #000; }
.scard-runs svg { width: 14px; height: 14px; fill: #fff; stroke: none; }
.scard-runs small { color: #e8e8ec; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.scard-media .scard-runs, .scard-media .scard-marks { transition: opacity .25s; }
.scard-body { display: grid; gap: 8px; min-width: 0; }
.scard-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 800 15.5px/1.2 var(--display); letter-spacing: 0; text-transform: uppercase; transition: color .2s; }
.scard-foot { display: flex; align-items: center; gap: 14px; min-width: 0; }
.scard-cat { overflow: hidden; color: var(--red-hot); font: 700 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.scard-stat { color: var(--dim); font: 700 11px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.scard-vote { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: auto; color: var(--dim); opacity: .6; font: 700 12.5px/1 var(--display); cursor: not-allowed; }
.scard-vote svg { width: 17px; height: 17px; stroke-width: 2; }
.scard-vote b { color: #fff; }

/* Poster hero (user reference "Endless Dream"): grayscale scene, red splatter, red sun with white rays, the game card in front,
   the game name tracked across the middle, tiny serif corner blocks, a flanked title. Red, black, white and gray only.
   Motion: plate push (sl-push), mist drift, ray turn, sun glow and sparkle twinkle; all keep running under reduced motion. */
.sp { position: relative; padding: 26px 0 0; background: #0a0a0c; }
.sp-inner { display: grid; gap: 18px; padding-bottom: 30px; }
.sp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.sp-row .ss-cta { margin-top: 0; }
.pst { --disc: clamp(150px, 15vw, 214px); --card: clamp(132px, 13vw, 190px); --serif: Georgia, "Times New Roman", serif;
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; aspect-ratio: 2 / 1; overflow: hidden; padding: 26px 0 24px; background: #1a1a1c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 40px 80px rgba(0, 0, 0, .6); color: #fff; text-align: center; }
.pst-art { position: absolute; inset: 0; pointer-events: none; }
.pst-art > * { position: absolute; }
.pst-plate { inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.45) brightness(.72); animation: sl-push 30s ease-in-out infinite alternate; }
.pst-mist { inset: -10% -20%; z-index: 1; background: radial-gradient(40% 30% at 30% 70%, rgba(255, 255, 255, .16), transparent 70%), radial-gradient(35% 28% at 72% 64%, rgba(255, 255, 255, .13), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(255, 255, 255, .12), transparent 70%); animation: pst-mist 24s ease-in-out infinite alternate; }
.pst-splat { inset: 0; z-index: 4; width: 100%; height: 100%; object-fit: cover; }
.pst-pillar { top: 0; bottom: 0; z-index: 5; width: 7%; }
.pst-pillar.is-left { left: 0; background: linear-gradient(90deg, #040405 0 58%, rgba(255, 255, 255, .06) 60%, #050506 62% 80%, transparent); }
.pst-pillar.is-right { right: 0; background: linear-gradient(270deg, #040405 0 58%, rgba(255, 255, 255, .06) 60%, #050506 62% 80%, transparent); }
.pst-lantern { bottom: 3%; z-index: 6; width: clamp(34px, 3.4vw, 50px); fill: #060607; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .35)); }
.pst-lantern, .pst-spark { height: auto; stroke: none; }
.pst-lantern.is-left { left: 1.6%; }
.pst-lantern.is-right { right: 1.6%; }
.pst-art .scene-grain { inset: 0; z-index: 7; opacity: .5; }

.pst-corner { position: absolute; z-index: 8; top: 22px; display: grid; gap: 3px; max-width: 26%; color: #d6d6d8; font: 400 10.5px/1.35 var(--serif); letter-spacing: .2em; text-transform: uppercase; }
.pst-corner b { color: #fff; font: italic 700 26px/1 var(--serif); letter-spacing: .02em; text-transform: none; }
.pst-corner span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pst-corner.is-tl { left: 10%; justify-items: start; text-align: left; }
.pst-corner.is-tr { right: 10%; justify-items: end; text-align: right; }

.pst-top { position: relative; z-index: 8; display: grid; justify-items: center; gap: 6px; padding: 0 30%; }
.pst-mark { width: 34px; height: 34px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .8)); }
.pst-head { font: 900 15px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; }
.pst-body { display: grid; gap: 2px; color: #cfcfd2; font: 400 10px/1.4 var(--serif); letter-spacing: .24em; text-transform: uppercase; }

.pst-stage { position: relative; height: calc(var(--disc) * .62 + var(--card)); margin: 4px 0; }
.pst-sun { top: 0; left: 50%; z-index: 3; width: var(--disc); height: var(--disc); border-radius: 50%; background: radial-gradient(circle at 42% 38%, #e01822, #c8111b 60%, #a00c15); box-shadow: 0 0 80px rgba(200, 17, 27, .55); translate: -50% 0; position: absolute; }
.pst-sun::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(225, 20, 30, .5), transparent); animation: bd-glow 3.2s ease-in-out infinite; }
.pst-rays { position: absolute; z-index: 2; top: calc(var(--disc) / 2); left: 50%; width: calc(var(--disc) * 3.4); aspect-ratio: 1; translate: -50% -50%; background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 .4deg, transparent .4deg 9deg); -webkit-mask: radial-gradient(closest-side, transparent 28%, #000 31%, transparent 92%); mask: radial-gradient(closest-side, transparent 28%, #000 31%, transparent 92%); animation: bd-turn 160s linear infinite; }
.pst-spaced { position: absolute; z-index: 8; left: 0; right: 0; top: calc(var(--disc) * .62 + var(--card) * .46); display: flex; justify-content: space-between; padding: 0 9%; color: rgba(255, 255, 255, .9); font: 400 12px/1 var(--serif); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); pointer-events: none; }
.pst-spaced span { min-width: .3em; }
.pst-card { position: absolute; z-index: 9; top: calc(var(--disc) * .62); left: 50%; width: var(--card); translate: -50% 0; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .75)); --cut: 16px; background: linear-gradient(135deg, #fff 0%, #c8111b 32%, #3a0307 62%, #e0141e 100%); }
.pst-card img { --cut: 14px; }
.pst-card.is-mark img { padding: 18%; object-fit: contain; background: #0b0b0d; }
.pst-spark { position: absolute; z-index: 10; top: calc(var(--disc) * .12); left: calc(50% + var(--disc) * .36); width: clamp(30px, 3.2vw, 46px); fill: #fff; filter: drop-shadow(0 0 10px #fff); translate: -50% -50%; animation: pst-twinkle 3.6s ease-in-out infinite; }

.pst-foot { position: relative; z-index: 8; display: grid; justify-items: center; gap: 8px; padding: 0 9%; }
.pst-flank { display: grid; grid-template-columns: auto minmax(20px, 1fr) minmax(0, auto) minmax(20px, 1fr) auto; align-items: center; gap: 16px; width: 100%; }
.pst-flank i { height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85)); }
.pst-flank i:last-of-type { background: linear-gradient(270deg, transparent, rgba(255, 255, 255, .85)); }
.pst-word { font: 400 12px/1 var(--serif); letter-spacing: .4em; text-transform: uppercase; white-space: nowrap; }
.pst-title { max-width: 26ch; margin: 0; font: italic 900 clamp(24px, 2.9vw, 44px)/1.02 var(--slab); text-transform: uppercase; text-shadow: 0 4px 24px rgba(0, 0, 0, .85); overflow-wrap: anywhere; }
.pst-date { font: 400 14px/1 var(--serif); letter-spacing: .3em; text-transform: uppercase; }
.pst-date b { margin: 0 .7em; color: #c8111b; font-weight: 700; }
.pst-fine { color: #bdbdc1; font: 400 10px/1.3 var(--serif); letter-spacing: .26em; text-transform: uppercase; }

@keyframes pst-mist { from { translate: -3% 0; } to { translate: 3% -1%; } }
@keyframes pst-twinkle { 0%, 100% { opacity: .75; scale: .82; } 50% { opacity: 1; scale: 1.08; } }

/* Detail page: RDR2 order. Hero with CTAs, a story band holding the loadstring, a feature row, the media carousel. */
.ss-tags .st { height: 28px; padding: 0 11px; font-size: 11.5px; }
.ss-cta { justify-content: flex-start; gap: 28px; margin-top: 6px; }
.ss-ghost { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .7); color: #fff; font: 700 13.5px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; transition: border-color .2s, color .2s; }
.ss-ghost svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.ss-ghost:hover { border-color: #fff; }
.ss-story { padding: 96px 0; }
.scene.ss-scene { inset: 0; z-index: -3; }
.ss-story .story-inner > * { max-width: 620px; }
.ss-story .story-inner .code-box { width: min(620px, 100%); }
.ss-banner { height: clamp(64px, 7vw, 104px); margin: 4px 0 2px; }
.ss-story-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.ss-story .kicker::before, .ss-story .kicker::after { content: none; }
.ss-story .story-lead .inline-wordmark { height: 2.1em; vertical-align: -.7em; }
.ss-marks { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; }
.ss-marks:not(:empty)::before { content: ""; position: absolute; inset: -16px -26px; z-index: -1; background: radial-gradient(closest-side, rgba(225, 20, 30, .5), transparent); animation: bd-glow 2.4s ease-in-out infinite; pointer-events: none; }
.ss-marks .mark-online { height: 38px; }
.ss-marks .mark-hot { height: 35px; }
.ss-marks .mark-offline { font-size: 16px; }
.ss-story .code-box { clip-path: none; border-radius: 2px; background: rgba(9, 9, 11, .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 3px 0 0 #c8111b; }
.ss-code-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 4px; color: var(--muted); font: 700 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.ss-code-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 14px 2px -10px; background: #c8111b; transform: rotate(45deg); }
.ss-actions { justify-content: flex-start; gap: 12px; }
.ss .btn-ghost svg, .ss-story .btn-ghost svg { fill: none; stroke: currentColor; }
.ss-vote { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 2px; background: rgba(0, 0, 0, .35); color: #fff; font: 700 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, background-color .2s; }
.ss-vote svg { width: 20px; height: 20px; stroke-width: 2; }
.ss-vote b { padding-left: 10px; border-left: 1px solid var(--line-2); }
.ss-vote:not(:disabled):hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.ss-vote:disabled { border-color: rgba(255, 255, 255, .2); color: var(--dim); cursor: not-allowed; }
.ss-feats { border-bottom: 1px solid var(--line-2); }
.ss-feat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ss-feat-grid .gx-card { min-height: 300px; padding-top: 40px; }
.ss-feat-grid .gx-card p .inline-wordmark { height: 2em; vertical-align: -.65em; }

/* Related scripts */
.ss-more .sec-head .label { flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .pst { aspect-ratio: auto; gap: 20px; }
}

@media (max-width: 960px) {
  .ss-feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .sp { padding-top: 18px; }
  .pst { --disc: 140px; --card: 128px; gap: 16px; padding: 16px 0 20px; }
  .pst-corner { top: 14px; max-width: 40%; font-size: 8.5px; letter-spacing: .14em; }
  .pst-corner b { font-size: 18px; }
  .pst-corner.is-tl { left: 7%; }
  .pst-corner.is-tr { right: 7%; }
  .pst-top { padding: 62px 10% 0; }
  .pst-head { font-size: 12px; letter-spacing: .26em; }
  .pst-body { font-size: 8.5px; letter-spacing: .16em; }
  .pst-spaced { padding: 0 5%; font-size: 9px; }
  .pst-foot { padding: 0 13%; }
  .pst-flank { grid-template-columns: minmax(0, 1fr); }
  .pst-flank i, .pst-word { display: none; }
  .pst-title { font-size: clamp(19px, 6.2vw, 26px); }
  .pst-date { font-size: 11px; letter-spacing: .2em; }
  .pst-pillar { width: 5%; }
  .pst-lantern { width: 26px; }
  .pst-lantern.is-left { left: 1%; }
  .pst-lantern.is-right { right: 1%; }
  .sp-row { justify-content: flex-start; }
  .ss-story { padding: 64px 0; }
  .scene.ss-scene { opacity: .6; }
  .ss-cta { gap: 18px; }
  .ss-cta .btn { flex: 1 1 100%; justify-content: center; }
  .ss-actions .btn, .ss-vote { flex: 1 1 100%; justify-content: center; }
  .ss-feat-grid { grid-template-columns: minmax(0, 1fr); }
  .ss-feat-grid .gx-card { min-height: 0; }
}
