/*
 * RobScript Game Requests v1.1
 * Uses only the theme's tokens, so seasonal skins (Halloween etc.) and light/dark switch it automatically.
 * Sits inside the theme's .entry-content card: no extra boxes except the game ticket and tiles.
 */
.rsgr,
.rsgr-more {
	--rsgr-bg: var(--surface, #1a1a1a);
	--rsgr-raise: var(--surface-2, #202020);
	--rsgr-raise-2: var(--surface-3, #232323);
	--rsgr-field: var(--field, #171717);
	--rsgr-line: var(--line, #292929);
	--rsgr-text: var(--text, #fff);
	--rsgr-muted: var(--muted, #c7c7c7);
	--rsgr-placeholder: var(--placeholder, #8f8f8f);
	--rsgr-accent: var(--accent, #ff3b7f);
	--rsgr-accent-hover: var(--accent-hover, #ff5a93);
	--rsgr-accent-soft: var(--accent-soft, rgba(255, 59, 127, .14));
	--rsgr-accent-line: var(--accent-line, rgba(255, 59, 127, .28));
	--rsgr-error: #ff7a8a;
	--rsgr-shadow: 0 12px 30px rgba(0, 0, 0, .28);
	--rsgr-icon-shadow: 0 8px 22px rgba(0, 0, 0, .4);
	--rsgr-art-opacity: .34;
	color: var(--rsgr-text);
}

:root[data-theme=light] .rsgr,
:root[data-theme=light] .rsgr-more {
	--rsgr-error: #c4213b;
	--rsgr-shadow: 0 10px 26px rgba(0, 0, 0, .07);
	--rsgr-icon-shadow: 0 6px 16px rgba(0, 0, 0, .14);
	--rsgr-art-opacity: .22;
}

.rsgr *,
.rsgr-more * {
	box-sizing: border-box;
}

/* Neutralise post-content styles from the theme inside the block. */
.entry-content .rsgr h2.rsgr-h,
.rsgr .rsgr-h {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 850;
	letter-spacing: -.02em;
	color: var(--rsgr-text);
}

.entry-content .rsgr a,
.entry-content .rsgr-more a,
.rsgr a {
	text-decoration: none;
}

.entry-content .rsgr p,
.rsgr p {
	margin: 0;
}

.entry-content .rsgr ol,
.rsgr ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.entry-content .rsgr li,
.rsgr li {
	margin: 0;
}

.rsgr {
	margin: 22px 0 6px;
}

.rsgr-sr,
.rsgr-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.rsgr-hp {
	left: -9999px !important;
}

.rsgr svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Search bar: same shape as the header search ---------------------- */

.rsgr-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 58px;
	padding: 7px;
	border: 1px solid var(--rsgr-line);
	border-radius: 16px;
	background: var(--rsgr-field);
	box-shadow: var(--rsgr-shadow);
	transition: border-color .15s, box-shadow .15s;
}

.rsgr-search:focus-within {
	border-color: var(--rsgr-accent);
	box-shadow: 0 0 0 4px var(--rsgr-accent-soft), var(--rsgr-shadow);
}

.rsgr-search-icon {
	display: grid;
	place-items: center;
	flex: 0 0 34px;
	height: 34px;
	margin-left: 4px;
	color: var(--rsgr-muted);
}

.rsgr-search-icon svg {
	width: 20px;
	height: 20px;
}

.rsgr-search input {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--rsgr-text);
	font: inherit;
	font-size: 16px;
	font-weight: 650;
	box-shadow: none;
}

.rsgr-search input::placeholder {
	color: var(--rsgr-placeholder);
}

.rsgr-search-btn,
.rsgr-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex: 0 0 auto;
	height: 42px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--rsgr-accent);
	color: #fff !important;
	font: inherit;
	font-size: 15px;
	font-weight: 850;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, transform .1s;
}

.rsgr-search-btn:hover:not(:disabled),
.rsgr-cta:hover:not(:disabled) {
	background: var(--rsgr-accent-hover);
}

.rsgr-search-btn:active:not(:disabled),
.rsgr-cta:active:not(:disabled) {
	transform: scale(.97);
}

.rsgr-search-btn:disabled,
.rsgr-cta:disabled {
	opacity: .7;
	cursor: default;
}

.rsgr-hint {
	margin-top: 10px !important;
	padding: 0 4px;
	font-size: 13px;
	color: var(--rsgr-muted);
}

.rsgr-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12.5px;
	color: var(--rsgr-text);
	overflow-wrap: anywhere;
}

.rsgr-error {
	margin-top: 12px !important;
	font-size: 14px;
	font-weight: 650;
	color: var(--rsgr-error) !important;
}

.rsgr-board .rsgr-error {
	margin: 0 0 10px !important;
}

/* Ticket (checked game) -------------------------------------------- */

.rsgr-result {
	margin-top: 18px;
}

.rsgr-ticket,
.rsgr-tile {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

/* Blurred copy of the game icon as a soft backdrop. */
.rsgr-ticket::before,
.rsgr-tile::before {
	content: "";
	position: absolute;
	inset: -30%;
	z-index: -2;
	background-image: var(--rsgr-art, none);
	background-size: cover;
	background-position: center;
	filter: blur(42px) saturate(1.5);
	opacity: var(--rsgr-art-opacity);
	pointer-events: none;
}

.rsgr-ticket::after,
.rsgr-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, transparent 0%, var(--rsgr-raise) 78%);
	pointer-events: none;
}

.rsgr-ticket {
	border: 1px solid var(--rsgr-line);
	border-radius: 20px;
	background: var(--rsgr-raise);
	animation: rsgr-in .28s ease-out both;
}

.rsgr-ticket-top {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 20px 20px 18px;
}

.rsgr-ticket-icon {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	border-radius: 22px;
	object-fit: cover;
	box-shadow: var(--rsgr-icon-shadow);
}

.rsgr-ticket-main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	min-width: 0;
}

.rsgr-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 750;
	color: var(--rsgr-muted);
}

.rsgr-status b {
	color: var(--rsgr-accent);
	font-weight: 900;
}

.rsgr-status svg {
	width: 15px;
	height: 15px;
	stroke-width: 3;
}

.rsgr-status--ok {
	color: var(--rsgr-accent);
}

.rsgr-ticket-name {
	font-size: 22px;
	font-weight: 850;
	line-height: 1.2;
	letter-spacing: -.02em;
	color: var(--rsgr-text) !important;
	overflow-wrap: anywhere;
}

.rsgr-ticket-name:hover {
	color: var(--rsgr-accent) !important;
}

.rsgr-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.rsgr-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 9px;
	border: 1px solid var(--rsgr-line);
	border-radius: 999px;
	background: var(--rsgr-bg);
	font-size: 12.5px;
	font-weight: 650;
	color: var(--rsgr-muted);
	white-space: nowrap;
}

.rsgr-live {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--rsgr-accent);
	box-shadow: 0 0 0 0 var(--rsgr-accent-line);
	animation: rsgr-pulse 2s ease-out infinite;
}

.rsgr-ticket-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 20px;
	border-top: 1px solid var(--rsgr-line);
}

.rsgr-ticket-line {
	flex: 1 1 220px;
	font-size: 15px;
	font-weight: 650;
	color: var(--rsgr-text) !important;
}

.rsgr-done {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 42px;
	padding: 0 16px;
	border-radius: 12px;
	background: var(--rsgr-accent-soft);
	color: var(--rsgr-accent);
	font-size: 15px;
	font-weight: 850;
}

.rsgr-done svg,
.rsgr-cta svg {
	width: 18px;
	height: 18px;
	stroke-width: 3;
}

/* Board ------------------------------------------------------------ */

.rsgr-board {
	margin-top: 34px;
}

.rsgr-board-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.rsgr-tabs {
	display: inline-flex;
	flex: 0 0 auto;
	padding: 3px;
	border: 1px solid var(--rsgr-line);
	border-radius: 11px;
	background: var(--rsgr-field);
}

.rsgr-tab {
	height: 32px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--rsgr-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.rsgr-tab[aria-selected=true] {
	background: var(--rsgr-raise-2);
	color: var(--rsgr-text);
}

.rsgr-list {
	transition: opacity .15s;
}

.rsgr-list[aria-busy=true] {
	opacity: .5;
}

/* Podium: top 3 */
.rsgr-podium {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.rsgr-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-height: 212px;
	padding: 14px 14px 12px;
	border: 1px solid var(--rsgr-line);
	border-radius: 18px;
	background: var(--rsgr-raise);
	animation: rsgr-in .3s ease-out both;
}

.rsgr-tile:nth-child(2) {
	animation-delay: .04s;
}

.rsgr-tile:nth-child(3) {
	animation-delay: .08s;
}

.rsgr-tile--first {
	border-color: var(--rsgr-accent-line);
	box-shadow: inset 0 0 0 1px var(--rsgr-accent-line);
}

.rsgr-tile-rank {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 900;
	color: var(--rsgr-muted);
	font-variant-numeric: tabular-nums;
}

.rsgr-tile--first .rsgr-tile-rank {
	color: var(--rsgr-accent);
}

.rsgr-tag {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--rsgr-accent-soft);
	color: var(--rsgr-accent);
	font-size: 10.5px;
	font-weight: 850;
	letter-spacing: .04em;
	text-transform: uppercase;
	vertical-align: 1px;
}

.rsgr-tile-icon {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	object-fit: cover;
	box-shadow: var(--rsgr-icon-shadow);
}

.rsgr-tile-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--rsgr-text) !important;
	overflow-wrap: anywhere;
}

.rsgr-tile-name:hover,
.rsgr-row-name:hover {
	color: var(--rsgr-accent) !important;
}

.rsgr-tile-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	margin-top: auto;
}

.rsgr-count {
	font-size: 12.5px;
	font-weight: 650;
	color: var(--rsgr-muted);
	white-space: nowrap;
}

.rsgr-count b {
	font-size: 20px;
	font-weight: 900;
	color: var(--rsgr-text);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
}

.rsgr-plus {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	min-width: 48px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--rsgr-line);
	border-radius: 11px;
	background: var(--rsgr-field);
	color: var(--rsgr-text);
	font: inherit;
	font-size: 15px;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, color .15s, transform .1s;
}

.rsgr-plus:hover:not(:disabled) {
	border-color: var(--rsgr-accent);
	color: var(--rsgr-accent);
}

.rsgr-plus:active:not(:disabled) {
	transform: scale(.94);
}

.rsgr-plus[aria-pressed=true] {
	border-color: var(--rsgr-accent-line);
	background: var(--rsgr-accent-soft);
	color: var(--rsgr-accent);
	cursor: default;
}

.rsgr-plus[aria-busy=true] {
	opacity: .55;
}

.rsgr-plus svg {
	width: 18px;
	height: 18px;
	stroke-width: 3;
}

/* Empty podium slot */
.rsgr-tile--empty {
	border-style: dashed;
	background: transparent;
}

.rsgr-tile--empty::before,
.rsgr-tile--empty::after {
	display: none;
}

.rsgr-slot {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rsgr-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 750;
	cursor: pointer;
	transition: color .15s;
}

.rsgr-slot-plus {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 1px dashed var(--rsgr-line);
	border-radius: 16px;
	font-size: 24px;
	font-weight: 500;
	transition: border-color .15s, color .15s;
}

.rsgr-slot:hover {
	color: var(--rsgr-text);
}

.rsgr-slot:hover .rsgr-slot-plus {
	border-color: var(--rsgr-accent);
	color: var(--rsgr-accent);
}

/* Rows: #4 and below, and the "Added" tab */
.rsgr-rows {
	display: grid;
	gap: 6px;
	margin-top: 12px !important;
}

.rsgr-list[data-view=recent] .rsgr-rows {
	margin-top: 0 !important;
}

.rsgr-row {
	display: grid;
	grid-template-columns: 22px 40px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 12px;
	border-radius: 14px;
	background:
		linear-gradient(90deg, var(--rsgr-accent-soft) var(--w, 0%), transparent var(--w, 0%)),
		var(--rsgr-raise);
}

.rsgr-list[data-view=recent] .rsgr-row {
	grid-template-columns: 40px minmax(0, 1fr) auto;
}

.rsgr-row-rank {
	font-size: 13px;
	font-weight: 900;
	color: var(--rsgr-muted);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.rsgr-row-icon {
	width: 40px;
	height: 40px;
	border-radius: 11px;
	object-fit: cover;
}

.rsgr-row-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.rsgr-row-name {
	overflow: hidden;
	font-size: 15px;
	font-weight: 750;
	line-height: 1.3;
	color: var(--rsgr-text) !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rsgr-row-sub {
	overflow: hidden;
	font-size: 12.5px;
	color: var(--rsgr-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rsgr-row .rsgr-count b {
	font-size: 15px;
}

.rsgr-row .rsgr-plus {
	height: 34px;
	min-width: 44px;
}

.rsgr-go {
	padding: 8px 6px;
	font-size: 14px;
	font-weight: 850;
	color: var(--rsgr-accent) !important;
	white-space: nowrap;
}

.rsgr-go:hover {
	color: var(--rsgr-accent-hover) !important;
}

/* Letter placeholder when Roblox has no icon */
.rsgr-ph {
	display: grid;
	place-items: center;
	background: var(--rsgr-raise-2);
	color: var(--rsgr-muted);
	font-weight: 900;
	font-size: 22px;
}

.rsgr-row-icon.rsgr-ph {
	font-size: 16px;
}

.rsgr-empty {
	padding: 22px;
	border: 1px dashed var(--rsgr-line);
	border-radius: 16px;
	text-align: center;
	color: var(--rsgr-muted);
}

.rsgr-note {
	margin-top: 16px !important;
	font-size: 12.5px;
	color: var(--rsgr-muted);
}

.rsgr-ts:empty {
	display: none;
}

.rsgr-ts {
	margin-top: 10px;
}

.rsgr-editor-note {
	padding: 16px;
	border: 1px dashed #999;
	border-radius: 8px;
	text-align: center;
}

.rsgr-search-btn:focus-visible,
.rsgr-cta:focus-visible,
.rsgr-plus:focus-visible,
.rsgr-tab:focus-visible,
.rsgr-slot:focus-visible,
.rsgr a:focus-visible {
	outline: 2px solid var(--rsgr-accent);
	outline-offset: 2px;
}

/* "Request more scripts" box on game pages ------------------------- */

.rsgr-more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin: 28px 0;
	padding: 16px 16px 16px 18px;
	border: 1px solid var(--rsgr-line);
	border-radius: 16px;
	background:
		radial-gradient(120% 140% at 0% 0%, var(--rsgr-accent-soft), transparent 60%),
		var(--rsgr-raise);
}

.rsgr-more-text {
	display: flex;
	flex: 1 1 240px;
	flex-direction: column;
	gap: 2px;
}

.rsgr-more-text strong {
	font-size: 16px;
	font-weight: 850;
	color: var(--rsgr-text);
}

.rsgr-more-text span {
	font-size: 14px;
	color: var(--rsgr-muted);
}

.rsgr-more .rsgr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 42px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--rsgr-accent);
	color: #fff !important;
	font: inherit;
	font-size: 15px;
	font-weight: 850;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.rsgr-more .rsgr-btn:hover:not(:disabled) {
	background: var(--rsgr-accent-hover);
}

.rsgr-more .rsgr-btn:disabled {
	background: var(--rsgr-accent-soft);
	color: var(--rsgr-accent) !important;
	cursor: default;
}

.rsgr-more .rsgr-btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.entry-content .rsgr-more p,
.rsgr-more-msg {
	flex: 1 1 100%;
	margin: 0;
	font-size: 14px;
	font-weight: 650;
	color: var(--rsgr-text);
}

.rsgr-more-msg:empty {
	display: none;
}

.entry-content .rsgr-more .rsgr-more-msg--error,
.rsgr-more-msg--error {
	color: var(--rsgr-error);
}

/* Motion ----------------------------------------------------------- */

@keyframes rsgr-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@keyframes rsgr-pulse {
	0% { box-shadow: 0 0 0 0 var(--rsgr-accent-line); }
	70%, 100% { box-shadow: 0 0 0 7px transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.rsgr *,
	.rsgr-more * {
		animation: none !important;
		transition: none !important;
	}
}

/* Phones ----------------------------------------------------------- */

@media (max-width: 600px) {
	.rsgr-search {
		min-height: 54px;
		padding: 6px;
	}

	.rsgr-search-icon {
		display: none;
	}

	.rsgr-search input {
		padding-left: 8px;
	}

	.rsgr-search-btn {
		padding: 0 14px;
	}

	.rsgr-ticket-top {
		gap: 14px;
		padding: 16px;
	}

	.rsgr-ticket-icon {
		flex-basis: 64px;
		width: 64px;
		height: 64px;
		border-radius: 17px;
	}

	.rsgr-ticket-name {
		font-size: 19px;
	}

	.rsgr-ticket-foot {
		padding: 14px 16px 16px;
	}

	.rsgr-ticket-foot .rsgr-cta,
	.rsgr-ticket-foot .rsgr-done {
		width: 100%;
		justify-content: center;
	}

	.rsgr-podium {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.rsgr-tile {
		display: grid;
		grid-template-columns: 26px 56px minmax(0, 1fr) auto;
		align-items: center;
		gap: 12px;
		min-height: 0;
		padding: 10px 10px 10px 12px;
	}

	.rsgr-tile-rank {
		flex-direction: column;
		gap: 4px;
	}

	.rsgr-tile-rank .rsgr-tag {
		display: none;
	}

	.rsgr-tile-icon {
		width: 56px;
		height: 56px;
		border-radius: 15px;
	}

	.rsgr-tile-foot {
		width: auto;
		margin: 0;
		gap: 10px;
	}

	.rsgr-tile .rsgr-count {
		font-size: 0;
	}

	.rsgr-tile .rsgr-count b {
		font-size: 17px;
	}

	.rsgr-tile--empty {
		grid-template-columns: 26px minmax(0, 1fr);
	}

	.rsgr-slot {
		flex-direction: row;
		justify-content: flex-start;
		gap: 12px;
	}

	.rsgr-slot-plus {
		width: 56px;
		height: 56px;
	}

	.rsgr-board-head .rsgr-h {
		font-size: 18px;
	}

	.rsgr-more .rsgr-btn {
		width: 100%;
	}
}
