/**
 * Reusable mobile game layout: edge-to-edge, full viewport height.
 * Used by Word Blossom, Word Trail, Library Labyrinth mobile pages.
 */

body.yws-mobile-shell:has(.yws-game-mobile-fit) {
	min-height: var(--yws-visual-viewport-height, 100dvh);
	min-height: -webkit-fill-available;
	overflow: hidden;
}

body.yws-mobile-shell:has(.yws-game-mobile-fit) .yws-mobile-shell-header {
	display: none;
}

body.yws-mobile-shell:has(.yws-game-mobile-fit) #simple-wrap,
body.yws-mobile-shell:has(.yws-game-mobile-fit) .yws-mobile-shell-main {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
	height: var(--yws-visual-viewport-height, 100dvh);
	max-height: var(--yws-visual-viewport-height, 100dvh);
	min-height: var(--yws-visual-viewport-height, 100dvh);
	min-height: -webkit-fill-available;
	box-sizing: border-box;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.word-blossom-page--mobile.yws-game-mobile-fit {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.yws-game-mobile-fit {
	display: flex;
	flex-direction: column;
	width: 100%;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	max-height: 100%;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	max-width: none;
	overflow: hidden;
}

.yws-game-mobile-fit__game {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

.yws-game-mobile-fit__chrome {
	flex: 0 0 auto;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
	background: var(--wb-accent-light, #f1f8e9);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.yws-game-mobile-fit__main {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #ffffff;
	position: relative;
}

.yws-game-mobile-fit__main--panel {
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
	overscroll-behavior: contain;
	touch-action: pan-y;
	scrollbar-width: thin;
	scrollbar-color: rgba(74, 107, 84, 0.45) rgba(0, 0, 0, 0.06);
}

.yws-game-mobile-fit__main--panel::-webkit-scrollbar {
	width: 8px;
}

.yws-game-mobile-fit__main--panel::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05);
}

.yws-game-mobile-fit__main--panel::-webkit-scrollbar-thumb {
	background: rgba(74, 107, 84, 0.45);
	border-radius: 4px;
}

.yws-game-mobile-fit__panel {
	flex: 0 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.yws-game-mobile-fit__panel[hidden] {
	display: none !important;
}

.yws-game-mobile-fit__stage {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.yws-game-mobile-fit__stage[hidden],
.word-blossom-app--mobile-panel-open .yws-game-mobile-fit__stage {
	display: none !important;
}

.yws-game-mobile-panel-title {
	margin: 0 0 12px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--wb-accent-border, #e1bee7);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--wb-accent-text, #4a148c);
}

.yws-game-mobile-panel-title__meta {
	font-weight: 600;
	font-size: 14px;
	opacity: 0.85;
}

.yws-game-mobile-fit__main--panel .yws-game-mobile-panel-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--wb-accent-border, #e1bee7);
}

.yws-game-mobile-fit__main--panel .yws-game-mobile-panel-topbar .yws-game-mobile-panel-title {
	margin: 0;
	padding: 0;
	border-bottom: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.yws-game-mobile-fit__main--panel .word-blossom-hints-grid-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Home + stats top row */

.yws-game-mobile-topbar {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin: 0;
	background: var(--wb-stats-bg, #1b3a1a);
	border: 0;
	border-bottom: 1px solid var(--wb-stats-border, #558b2f);
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	transition: background-color 0.45s ease, border-color 0.45s ease;
}

.yws-game-mobile-home {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 52px;
	padding: 4px 6px;
	border-right: 1px solid var(--wb-stats-border, #558b2f);
	text-decoration: none;
	transition: border-color 0.45s ease, background-color 0.15s ease;
}

.yws-game-mobile-home:hover,
.yws-game-mobile-home:focus {
	background: rgba(255, 255, 255, 0.06);
	outline: none;
}

.yws-game-mobile-home__logo {
	display: block;
	width: 36px;
	height: 30px;
	object-fit: contain;
}

.yws-game-mobile-home__label {
	display: block;
	font-size: 9px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wb-stats-label-text, rgba(255, 255, 255, 0.94));
}

.yws-game-mobile-topbar__stats {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
}

.yws-game-mobile-topbar__stats .word-blossom-mobile-stat {
	padding: 7px 2px;
	gap: 2px;
}

.yws-game-mobile-topbar__stats .word-blossom-mobile-stat-icon {
	font-size: 14px;
}

.yws-game-mobile-topbar__stats .word-blossom-mobile-stat-value {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.yws-game-mobile-topbar__stats .word-blossom-mobile-stat-label {
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.03em;
	opacity: 1;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

/* Rank bar + toolbar (single row) */

.yws-game-mobile-fit .word-blossom-mobile-rank-bar {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 10px;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-top: 0;
}

.yws-game-mobile-fit .word-blossom-mobile-rank {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
}

.yws-game-mobile-fit .word-blossom-rank-progress {
	height: 6px;
	margin: 0 0 3px;
}

.yws-game-mobile-fit .word-blossom-rank-next {
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.yws-game-mobile-fit .word-blossom-mobile-toolbar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	width: auto;
	max-width: 54%;
	margin: 0;
	padding: 0;
	border-top: 0;
	border-radius: 0;
	box-sizing: border-box;
}

.yws-game-mobile-fit .word-blossom-mobile-toolbar-btn {
	height: 28px;
	line-height: 28px;
	font-size: 10px;
	border-radius: 14px;
	padding: 0 8px;
}

.yws-game-mobile-fit .word-blossom-mobile-words-btn {
	font-size: 9px;
	padding: 0 7px;
}

.yws-game-mobile-fit .word-blossom-mobile-words-btn__count {
	margin-left: 2px;
	font-weight: 600;
}

.yws-game-mobile-fit .word-blossom-mobile-words-wrap,
.yws-game-mobile-fit .word-blossom-mobile-hints-wrap {
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px) + var(--yws-browser-chrome-bottom, 0px));
	background: #ffffff;
	color: #4a3d52;
}

.yws-game-mobile-fit .word-blossom-mobile-found-list {
	max-height: none;
	overflow: visible;
	columns: unset;
	column-count: unset;
}

/* Play stage */

.yws-game-mobile-fit {
	--wb-mobile-hex-size: min(72vw, 40dvh, 280px);
	--wb-mobile-letter-size: calc(var(--wb-mobile-hex-size) * 0.229);
	--wb-mobile-hex-arm-v: calc(var(--wb-mobile-hex-size) * 0.314);
	--wb-mobile-hex-arm-h: calc(var(--wb-mobile-hex-size) * 0.271);
}

.yws-game-mobile-fit .word-blossom-mobile-play {
	margin: 0;
	padding: 12px 0 var(--yws-browser-chrome-bottom, 0px);
	background: #ffffff;
	color: #4a3d52;
	border-radius: 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.yws-game-mobile-fit .word-blossom-mobile-puzzle-stack {
	flex: 1 1 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0 12px;
	box-sizing: border-box;
}

.yws-game-mobile-fit .word-blossom-current-wrap {
	flex: 0 0 auto;
	min-height: 32px;
	padding: 0;
	width: 100%;
	text-align: center;
}

.yws-game-mobile-fit .word-blossom-current {
	display: inline-block;
	max-width: 100%;
	font-size: 26px;
	min-height: 32px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding-right: 0.04em;
	text-align: center;
}

.yws-game-mobile-fit .word-blossom-feedback {
	flex: 0 0 auto;
	width: 100%;
	height: clamp(44px, 7.5dvh, 60px);
	margin: 2px 0 8px;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.yws-game-mobile-fit .word-blossom-message {
	width: 100%;
	max-width: none;
	text-align: center;
}

.yws-game-mobile-fit .word-blossom-message.is-success,
.yws-game-mobile-fit .word-blossom-message.is-error,
.yws-game-mobile-fit .word-blossom-message.is-pangram {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}

.yws-game-mobile-fit .word-blossom-message.is-hint {
	text-align: center;
}

.yws-game-mobile-fit .word-blossom-meta--stage {
	flex: 0 0 auto;
	text-align: center;
	margin: 0 0 6px;
	padding: 0 12px;
}

.yws-game-mobile-fit .word-blossom-hex-wrap {
	flex: 0 0 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0 0 20px;
	padding: 0;
}

.yws-game-mobile-fit .word-blossom-hex {
	width: var(--wb-mobile-hex-size);
	height: var(--wb-mobile-hex-size);
	margin: 0;
	flex: 0 0 auto;
}

.yws-game-mobile-fit .word-blossom-letter {
	width: var(--wb-mobile-letter-size);
	height: var(--wb-mobile-letter-size);
	line-height: var(--wb-mobile-letter-size);
	font-size: calc(var(--wb-mobile-letter-size) * 0.375);
}

.yws-game-mobile-fit .word-blossom-letter-center {
	left: calc(50% - var(--wb-mobile-letter-size) / 2);
	top: calc(50% - var(--wb-mobile-letter-size) / 2);
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="0"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2);
	top: calc(50% - var(--wb-mobile-letter-size) / 2 - var(--wb-mobile-hex-arm-v));
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="1"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2 + var(--wb-mobile-hex-arm-h));
	top: calc(50% - var(--wb-mobile-letter-size) / 2 - var(--wb-mobile-hex-arm-v) / 2);
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="2"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2 + var(--wb-mobile-hex-arm-h));
	top: calc(50% - var(--wb-mobile-letter-size) / 2 + var(--wb-mobile-hex-arm-v) / 2);
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="3"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2);
	top: calc(50% - var(--wb-mobile-letter-size) / 2 + var(--wb-mobile-hex-arm-v));
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="4"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2 - var(--wb-mobile-hex-arm-h));
	top: calc(50% - var(--wb-mobile-letter-size) / 2 + var(--wb-mobile-hex-arm-v) / 2);
}

.yws-game-mobile-fit .word-blossom-letter-outer[data-index="5"] {
	left: calc(50% - var(--wb-mobile-letter-size) / 2 - var(--wb-mobile-hex-arm-h));
	top: calc(50% - var(--wb-mobile-letter-size) / 2 - var(--wb-mobile-hex-arm-v) / 2);
}

.yws-game-mobile-fit .word-blossom-mobile-controls {
	gap: 0;
	margin: 0;
	flex: 0 0 auto;
	border-top: 1px solid var(--wb-accent-border, #c5e1a5);
}

.yws-game-mobile-fit .word-blossom-mobile-control-btn {
	min-height: 52px;
	padding: 6px 4px;
	font-size: 12px;
	gap: 4px;
	border-radius: 0;
	border: 0;
	border-right: 1px solid var(--wb-accent-border, #c5e1a5);
	box-shadow: none;
}

.yws-game-mobile-fit .word-blossom-mobile-control-btn:last-child {
	border-right: 0;
}

.yws-game-mobile-fit .word-blossom-mobile-control-icon {
	font-size: 17px;
}

.yws-game-mobile-fit .word-blossom-mobile-enter {
	flex: 0 0 auto;
	display: block;
	width: 100%;
	margin: 0;
	padding: 16px 16px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	font-size: 18px;
	font-weight: 700;
	border-radius: 0;
	color: #ffffff;
	background: linear-gradient(180deg, var(--wb-enter-top) 0%, var(--wb-enter-mid) 55%, var(--wb-enter-bottom) 100%);
	border: 0;
	border-top: 1px solid var(--wb-enter-border);
	box-shadow: none;
	text-shadow: none;
	filter: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	position: sticky;
	bottom: 0;
	z-index: 5;
}

.yws-game-mobile-fit .word-blossom-mobile-enter:hover,
.yws-game-mobile-fit .word-blossom-mobile-enter:focus {
	background: linear-gradient(180deg, var(--wb-enter-hover-top) 0%, var(--wb-enter-hover-mid) 55%, var(--wb-enter-hover-bottom) 100%);
	color: #ffffff;
	box-shadow: none;
	outline: none;
}

.yws-game-mobile-fit .word-blossom-mobile-enter:active {
	transform: none;
	opacity: 0.92;
}

@media (max-height: 640px) {
	.yws-game-mobile-fit {
		--wb-mobile-hex-size: min(66vw, 36dvh, 240px);
	}

	.yws-game-mobile-fit .word-blossom-feedback {
		height: clamp(40px, 7dvh, 50px);
	}

	.yws-game-mobile-fit .word-blossom-mobile-control-btn {
		min-height: 46px;
	}
}

/* Chrome palettes — dark stats bar, cream play chrome below */

.yws-game-mobile-fit__chrome {
	--wb-stats-bg: #3d1f4a;
	--wb-stats-border: #6a1b9a;
	--wb-stats-text: #ffffff;
	--wb-stats-label-text: rgba(255, 255, 255, 0.94);
	--wb-accent-light: #f3e5f5;
	--wb-accent-border: #e1bee7;
	--wb-accent-text: #4a148c;
	--wb-accent-muted: #ce93d8;
	--wb-accent: #7b1fa2;
	--wb-accent-dark: #6a1b9a;
	--wb-chrome-btn-text: #ffffff;
	background: var(--wb-accent-light, #f3e5f5);
}

.yws-game-mobile-fit__chrome .word-blossom-mobile-stats,
.yws-game-mobile-fit__chrome .word-blossom-mobile-stat-value {
	color: var(--wb-stats-text, #ffffff);
}

.yws-game-mobile-fit__chrome .word-blossom-mobile-stat-label {
	color: var(--wb-stats-label-text, rgba(255, 255, 255, 0.94));
}

.yws-game-mobile-fit__chrome .yws-game-mobile-topbar {
	background: var(--wb-stats-bg, #3d1f4a);
	border-bottom-color: var(--wb-stats-border, #6a1b9a);
}

.yws-game-mobile-fit__chrome .yws-game-mobile-home {
	border-right-color: var(--wb-stats-border, #6a1b9a);
}

.yws-game-mobile-fit__chrome .word-blossom-mobile-toolbar-btn {
	color: var(--wb-chrome-btn-text, #ffffff);
}

/* Rankings panels + desktop modal lists */

.yws-game-rankings-shell {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
}

.yws-game-rankings-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.yws-game-rankings-header__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: none;
	text-decoration: none;
	color: var(--wb-accent-text, #33691e);
	border: 0;
}

.yws-game-mobile-fit .yws-game-rankings-header__title,
#content.yws-game-mobile-fit .yws-game-rankings-header__title,
#content.wordtrail-page--mobile .yws-game-rankings-header__title,
#content.word-blossom-page--mobile .yws-game-rankings-header__title {
	font-family: inherit;
	font-weight: 700;
	font-size: 17px;
	text-transform: none;
	text-decoration: none;
	border: 0;
	margin: 0;
	padding: 0;
	color: var(--wb-accent-text, #33691e);
}

.yws-game-mobile-fit .yws-game-rankings-section__title,
#content.yws-game-mobile-fit .yws-game-rankings-section__title {
	font-family: inherit;
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	text-decoration: none;
	border: 0;
	border-bottom: 1px solid rgba(74, 107, 84, 0.12);
	margin: 0 0 12px;
	padding: 0 0 10px;
	color: var(--wb-accent-text, #33691e);
	letter-spacing: 0.05em;
}

.yws-game-rankings-lede,
.yws-game-rankings-modal-lede {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--wb-muted-text, #5f6b63);
}

.yws-game-rankings-modal .reading-modal-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.yws-game-rankings-modal .reading-modal-header h2 {
	margin: 0;
}

.yws-game-rankings-modal.reading-modal--wide {
	max-height: var(--yws-modal-max-height);
	min-height: 0;
	overflow: hidden;
}

/* Desktop modals: scroll the reading-modal-body only, not nested regions. */
.reading-modal-backdrop .yws-game-rankings-scroll {
	flex: none;
	min-height: 0;
	max-height: none;
	overflow: visible;
}

.yws-game-rankings-modal-lede {
	color: rgba(255, 255, 255, 0.82);
	font-weight: 500;
}

.yws-game-rankings-count {
	margin: 0;
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: var(--wb-accent-text, #33691e);
	background: var(--wb-accent-light, rgba(197, 225, 165, 0.45));
	border: 1px solid var(--wb-accent-border, #c5e1a5);
}

.yws-game-rankings-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 28px 16px;
	color: var(--wb-muted-text, #5f6b63);
	font-size: 14px;
	font-weight: 600;
}

.yws-game-rankings-loading[hidden] {
	display: none !important;
}

.yws-game-rankings-loading__spinner {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid rgba(74, 107, 84, 0.18);
	border-top-color: var(--wb-accent-text, #33691e);
	animation: yws-game-rankings-spin 0.75s linear infinite;
}

@keyframes yws-game-rankings-spin {
	to {
		transform: rotate(360deg);
	}
}

.yws-game-rankings-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.yws-game-rankings-empty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 28px 18px;
	border-radius: 16px;
	text-align: center;
	background: rgba(255, 255, 255, 0.68);
	border: 1px dashed rgba(74, 107, 84, 0.22);
}

.yws-game-rankings-empty-card[hidden] {
	display: none !important;
}

.yws-game-rankings-empty-card--compact {
	padding: 18px 14px;
}

.yws-game-rankings-empty-card__icon {
	font-size: 28px;
	line-height: 1;
}

.yws-game-rankings-empty-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wb-accent-text, #33691e);
}

.yws-game-rankings-empty-card__sub {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--wb-muted-text, #5f6b63);
}

.yws-game-rankings-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yws-game-rankings-list[hidden] {
	display: none !important;
}

.yws-game-rankings-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	cursor: default;
	animation: yws-game-rankings-row-in 0.28s ease both;
}

@keyframes yws-game-rankings-row-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.yws-game-rankings-row--self {
	background: linear-gradient(135deg, rgba(197, 225, 165, 0.52) 0%, rgba(255, 255, 255, 0.9) 100%);
	border-color: var(--wb-accent-border, #c5e1a5);
	box-shadow: inset 3px 0 0 var(--wb-accent-text, #558b2f), 0 2px 8px rgba(85, 139, 47, 0.12);
}

.yws-game-rankings-row--highlight {
	animation: yws-game-rankings-pulse 1.1s ease 2;
}

@keyframes yws-game-rankings-pulse {
	0%,
	100% {
		box-shadow: inset 3px 0 0 var(--wb-accent-text, #558b2f), 0 2px 8px rgba(85, 139, 47, 0.12);
	}

	50% {
		box-shadow: inset 3px 0 0 var(--wb-accent-text, #558b2f), 0 0 0 3px rgba(85, 139, 47, 0.18);
	}
}

.yws-game-rankings-row__rank {
	flex: 0 0 2.1rem;
	width: 2.1rem;
	height: 2.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-weight: 800;
	font-size: 14px;
	line-height: 1;
	text-align: center;
	color: var(--wb-accent-text, #33691e);
	background: rgba(74, 107, 84, 0.1);
}

.yws-game-rankings-row__rank--gold {
	color: #6d4c00;
	background: linear-gradient(145deg, #fff4c2 0%, #ffd54f 55%, #ffb300 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.yws-game-rankings-row__rank--silver {
	color: #455a64;
	background: linear-gradient(145deg, #f5f7fa 0%, #cfd8dc 55%, #b0bec5 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.yws-game-rankings-row__rank--bronze {
	color: #6d4c41;
	background: linear-gradient(145deg, #fbe9e7 0%, #ffab91 55%, #ff8a65 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.yws-game-rankings-player {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
}

.yws-game-rankings-player__avatar {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(74, 107, 84, 0.12);
	border: 2px solid rgba(255, 255, 255, 0.9);
	box-sizing: border-box;
}

.yws-game-rankings-player__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yws-game-rankings-player__avatar--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 800;
	color: var(--wb-accent-text, #33691e);
}

.yws-game-rankings-player__body {
	flex: 1 1 auto;
	min-width: 0;
}

.yws-game-rankings-player__name-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.yws-game-rankings-player__name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: #1f2d24;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.yws-game-rankings-player__stats {
	margin: 2px 0 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	color: #6b7b72;
	letter-spacing: 0.01em;
}

.yws-game-rankings-you-badge {
	display: inline-flex;
	align-items: center;
	margin-right: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--wb-accent-text, #558b2f);
	vertical-align: middle;
}

.yws-game-rankings-row__score {
	flex: 0 0 auto;
	min-width: 3.4rem;
	padding: 6px 10px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	color: var(--wb-accent-text, #33691e);
	background: rgba(74, 107, 84, 0.1);
	border: 1px solid rgba(74, 107, 84, 0.12);
}

.yws-game-rankings-section {
	margin-top: 18px;
	padding: 14px 12px 12px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.yws-game-rankings-section:first-child {
	margin-top: 0;
}

.yws-game-rankings-section[hidden] {
	display: none !important;
}

.yws-game-rankings-section__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0 0 10px;
	border: 0;
	border-bottom: 1px solid rgba(74, 107, 84, 0.12);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wb-accent-text, #33691e);
}

#content .yws-game-rankings-section__title,
.content .yws-game-rankings-section__title {
	font-family: inherit;
	font-weight: 800;
	text-decoration: none;
	border-top: 0;
	border-left: 0;
	border-right: 0;
	margin-top: 0;
}

.yws-game-rankings-section__icon {
	font-size: 15px;
	line-height: 1;
}

.yws-game-rankings-section__label {
	flex: 1 1 auto;
	min-width: 0;
}

.yws-game-rankings-section__count {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wb-accent-text, #33691e);
	background: rgba(74, 107, 84, 0.1);
}

.word-blossom-app--garden-sage .yws-game-rankings-section__title,
.word-blossom-app--garden-sage .yws-game-rankings-row__rank,
.word-blossom-app--garden-sage .yws-game-rankings-count,
.word-blossom-app--garden-sage .yws-game-rankings-empty-card__title {
	color: var(--wb-accent-text, #4a148c);
}

.word-blossom-app--garden-sage .yws-game-rankings-row--self {
	background: linear-gradient(135deg, rgba(225, 190, 231, 0.52) 0%, rgba(255, 255, 255, 0.92) 100%);
	border-color: var(--wb-accent-border, #ce93d8);
	box-shadow: inset 3px 0 0 var(--wb-accent-text, #7b1fa2), 0 2px 8px rgba(74, 20, 140, 0.12);
}

.word-blossom-app--garden-sage .yws-game-rankings-you-badge {
	background: var(--wb-accent-text, #7b1fa2);
}

.word-blossom-app--garden-sage .yws-game-rankings-count {
	background: var(--wb-accent-light, rgba(225, 190, 231, 0.45));
	border-color: var(--wb-accent-border, #ce93d8);
}

.yws-game-rankings-modal__body {
	padding-top: 4px;
	min-height: 0;
}

.yws-game-mobile-rankings-wrap {
	padding: 2px 0 10px;
}

.yws-game-mobile-fit .yws-game-mobile-rankings-wrap {
	margin: 0;
	padding: 0 12px 16px;
	background: #ffffff;
}

.yws-game-mobile-fit__main--panel .yws-game-mobile-rankings-wrap {
	padding: 0 12px calc(16px + env(safe-area-inset-bottom, 0px) + var(--yws-browser-chrome-bottom, 0px));
}

.yws-game-mobile-fit__main--panel .yws-game-rankings-shell {
	min-height: 0;
	padding-top: 10px;
}

/* Mobile rankings: scroll the main panel (like Your Words), not a nested trap. */
.yws-game-mobile-fit .yws-game-mobile-rankings-wrap .yws-game-rankings-scroll {
	flex: none;
	min-height: 0;
	overflow: visible;
}

.yws-game-mobile-panel-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--wb-accent-border, #c5e1a5);
}

.yws-game-mobile-fit__main--panel .yws-game-mobile-panel-topbar {
	position: sticky;
	top: 0;
	z-index: 2;
	margin: -10px -12px 10px;
	padding: 10px 12px;
	background: #ffffff;
}

.yws-game-mobile-panel-topbar .yws-game-rankings-header__title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.yws-game-mobile-panel-back {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid var(--wb-accent-border, #c5e1a5);
	border-radius: 999px;
	background: var(--wb-accent-light, #f1f8e9);
	color: var(--wb-accent-text, #33691e);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.yws-game-mobile-panel-back:hover,
.yws-game-mobile-panel-back:focus {
	background: #ffffff;
	outline: none;
	box-shadow: 0 0 0 2px rgba(85, 139, 47, 0.18);
}

.yws-game-mobile-panel-back:active {
	transform: scale(0.98);
}

.wordtrail-page--mobile.yws-game-mobile-fit .yws-game-mobile-panel-back {
	background: #faf6f0;
	border-color: var(--wb-accent-border, #e8ddd0);
	color: var(--wb-accent-text, #6b4423);
}

.word-blossom-page--mobile.yws-game-mobile-fit .yws-game-mobile-panel-back[aria-expanded="true"],
.yws-game-mobile-fit .word-blossom-app--mobile-panel-open .yws-game-mobile-panel-back {
	background: #ffffff;
}

.yws-game-mobile-fit .yws-game-rankings-lede {
	font-size: 13px;
}

.yws-game-mobile-fit .yws-game-rankings-section {
	padding: 12px 10px 10px;
}

.yws-game-mobile-fit .yws-game-rankings-row {
	padding: 11px 10px;
}

/* Daily game interstitial (Word Blossom / Word Trail) */

#word-blossom-app,
#wordtrail-app,
#wordweave-app {
	position: relative;
}

.yws-game-daily-intro {
	position: absolute;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 24px;
	box-sizing: border-box;
	border-radius: inherit;
	background:
		radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
		linear-gradient(165deg, var(--wb-accent-light, #f3e5f5) 0%, #ffffff 48%, var(--wb-accent-soft, #faf6fc) 100%);
	color: var(--wb-accent-text, #6a1b9a);
	text-align: center;
	opacity: 1;
	transition: opacity 0.22s ease;
}

.yws-game-daily-intro.is-leaving {
	opacity: 0;
	pointer-events: none;
}

.yws-game-daily-intro[hidden] {
	display: none !important;
}

.yws-game-daily-intro__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 320px;
	width: 100%;
}

.yws-game-daily-intro__badge {
	display: inline-block;
	margin: 0;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--wb-accent-border, #e1bee7);
	background: rgba(255, 255, 255, 0.72);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wb-accent-muted, #9c27b0);
}

.yws-game-daily-intro__title {
	margin: 0;
	font-family: BebasNeue, "Bebas Neue", Impact, sans-serif;
	font-size: clamp(2.4rem, 8vw, 3.4rem);
	font-weight: normal;
	letter-spacing: 0.02em;
	line-height: 1;
	color: var(--wb-accent-dark, #6a1b9a);
}

.yws-game-daily-intro__date {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--wb-text-muted, #4a3d52);
}

.yws-game-daily-intro__tagline {
	margin: 2px 0 6px;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 500;
	color: var(--wb-accent-text, #6a1b9a);
}

.yws-game-daily-intro__play {
	min-width: 148px;
	margin-top: 4px;
	padding: 12px 28px;
	font-size: 16px;
}

.yws-game-mobile-fit__game > .yws-game-daily-intro {
	border-radius: 0;
	padding: 32px 28px calc(32px + env(safe-area-inset-bottom, 0px));
}

.yws-game-mobile-fit__game > .yws-game-daily-intro .yws-game-daily-intro__title {
	font-size: clamp(2.8rem, 12vw, 3.6rem);
}

.yws-game-mobile-fit__game > .yws-game-daily-intro .yws-game-daily-intro__tagline {
	font-size: 18px;
}

.yws-game-mobile-fit__game > .yws-game-daily-intro .yws-game-daily-intro__play {
	min-width: 168px;
	padding: 14px 32px;
	font-size: 17px;
}
