/* Scout mode: Shorts-style song discovery. Phone = full-screen reel; desktop = reel + context side panels. */
html.mscout-open, html.mscout-open body { overflow: hidden; }

.mscout-launch {
	position: fixed; right: 18px; bottom: 18px; z-index: 900;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 18px; border: 0; border-radius: 999px;
	background: #f8107d; color: #fff; font-weight: 800; font-size: 15px;
	box-shadow: 0 10px 28px rgba(248, 16, 125, .35); cursor: pointer;
}
.mscout-launch:hover, .mscout-launch:focus-visible { background: #d80a6a; outline: 3px solid rgba(248, 16, 125, .35); outline-offset: 2px; }
.mscout-launch[hidden] { display: none; }
/* Site-wide `button { height: 2em; line-height: 2em }` would squash these controls. */
.mscout-launch, .mscout-act, .mscout-swatch, .mscout-queue-item, .mscout-guest-dismiss { height: auto; line-height: 1.25; }
.mscout-close, .mscout-play { line-height: 1; }
.mscout-act, .mscout-swatch, .mscout-queue-item, .mscout-guest-dismiss { box-shadow: none; }
.mscout-launch.is-inline {
	position: static; margin-left: auto; padding: 7px 14px; font-size: 13px;
	box-shadow: none; border: 1px solid rgba(255, 255, 255, .5); flex-shrink: 0;
}
#music_hub .music-view-controls + .mscout-launch.is-inline { margin-left: 8px; }

.mscout {
	position: fixed; inset: 0; z-index: 10000;
	display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr;
	background: #0b0f16; color: #eef3fb;
	font-family: inherit;
}
.mscout[hidden] { display: none; }
.mscout:not([hidden]) { animation: mscout-in .22s ease-out; }
.mscout.is-closing { animation: mscout-out .18s ease-in forwards; }
@keyframes mscout-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes mscout-out { to { opacity: 0; transform: translateY(24px); } }

.mscout-top {
	grid-column: 1 / -1; display: flex; align-items: center; gap: 14px;
	padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.mscout-brand { font-weight: 900; font-size: 16px; }
.mscout-hint { flex: 1; font-size: 12px; color: #9fb0c8; display: none; }
.mscout-close {
	margin-left: auto; width: 40px; height: 40px; border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06);
	color: #fff; font-size: 18px; cursor: pointer;
}
.mscout-close:hover, .mscout-close:focus-visible { background: #f8107d; border-color: #f8107d; }

.mscout-side { display: none; }

.mscout-feed {
	height: 100%; overflow-y: auto; overflow-x: hidden;
	scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
	scrollbar-width: none; outline: none;
}
.mscout-feed::-webkit-scrollbar { display: none; }

.mscout-slide {
	position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
	display: flex; align-items: center; justify-content: center; padding: 12px;
	overflow: hidden;
}
.mscout-slide::before {
	content: ""; position: absolute; inset: -40px;
	background: var(--mscout-cover) center / cover no-repeat;
	filter: blur(40px) brightness(.45); transform: scale(1.1);
}
.mscout-frame {
	position: relative; z-index: 1;
	width: min(100%, calc((100vh - 90px) * 9 / 16)); max-width: 520px;
	aspect-ratio: 9 / 16; max-height: 100%;
}
.mscout-stage {
	position: relative; width: 100%; height: 100%;
	border-radius: 20px; overflow: hidden; background: #111;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.mscout-cover { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 40%; }
.mscout-slide.is-playing .mscout-cover { animation: mscout-zoom var(--mscout-preview, 15s) linear both; }
@keyframes mscout-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.mscout-stage::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, transparent 25%, transparent 55%, rgba(0, 0, 0, .8) 100%);
}
.mscout-play {
	position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 2;
	width: 84px; height: 84px; border-radius: 999px; border: 0;
	background: rgba(0, 0, 0, .5); color: #fff; font-size: 30px; cursor: pointer;
	backdrop-filter: blur(6px); transition: opacity .2s;
}
.mscout-slide.is-playing .mscout-play { opacity: 0; }
.mscout-slide.is-playing .mscout-stage:hover .mscout-play,
.mscout-play:focus-visible { opacity: 1; }
.mscout-progress { position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 3; background: rgba(255, 255, 255, .2); }
.mscout-progress-fill { display: block; height: 100%; width: 100%; background: #f8107d; transform: scaleX(0); transform-origin: left; transition: transform .25s linear; }

.mscout-eq {
	position: absolute; top: 14px; left: 14px; z-index: 3; height: 16px;
	display: flex; align-items: flex-end; gap: 3px; opacity: 0; transition: opacity .2s;
}
.mscout-eq i { display: block; width: 4px; height: 100%; border-radius: 2px; background: #fff; transform-origin: bottom; transform: scaleY(.3); }
.mscout-slide.is-playing .mscout-eq { opacity: 1; }
.mscout-slide.is-playing .mscout-eq i { animation: mscout-eq .9s ease-in-out infinite; }
.mscout-slide.is-playing .mscout-eq i:nth-child(2) { animation-delay: -.3s; }
.mscout-slide.is-playing .mscout-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes mscout-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.mscout-burst {
	position: absolute; z-index: 5; pointer-events: none; font-size: 90px; line-height: 1; color: #f8107d;
	text-shadow: 0 6px 24px rgba(0, 0, 0, .45); transform: translate(-50%, -50%);
	animation: mscout-burst .7s ease-out forwards;
}
@keyframes mscout-burst {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
	25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
	45% { transform: translate(-50%, -50%) scale(1); }
	100% { opacity: 0; transform: translate(-50%, -120%) scale(1); }
}

.mscout-act-icon.is-like { animation: mscout-pop .3s ease-out; }
.mscout-act-icon.is-dislike { animation: mscout-tilt .35s ease-out; }
.mscout-act-icon.is-wish { animation: mscout-bounce .35s ease-out; }
@keyframes mscout-pop { 50% { transform: scale(1.28); } }
@keyframes mscout-tilt { 25% { transform: translateY(3px) rotate(-12deg); } 60% { transform: translateY(3px) rotate(8deg); } }
@keyframes mscout-bounce { 40% { transform: translateY(-7px); } 70% { transform: translateY(1px); } }

.mscout-meta {
	position: absolute; left: 0; right: 76px; bottom: 0; z-index: 2;
	padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.mscout-title { color: #fff; font-size: 19px; font-weight: 900; line-height: 1.25; text-decoration: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.mscout-artist {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
	border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 800; text-decoration: none;
}
.mscout-avatar { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }
.mscout-board { font-size: 12px; font-weight: 800; color: #ffd1e6; text-decoration: none; text-transform: uppercase; letter-spacing: .05em; }

.mscout-rail {
	position: absolute; right: 10px; top: 32px; bottom: 96px; z-index: 4;
	display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(6px, 1.6vh, 14px);
}
/* Keep every rail action inside the card on short viewports. */
@media (max-height: 760px) {
	.mscout-rail { bottom: 84px; }
	.mscout-act-icon { width: 40px; height: 40px; font-size: 18px; }
	.mscout-act { font-size: 10px; gap: 2px; }
}
@media (max-height: 580px) {
	.mscout-rail { top: 24px; bottom: 72px; }
	.mscout-act-icon { width: 34px; height: 34px; font-size: 16px; }
	.mscout-act-label { display: none; }
}
.mscout-act {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	background: none; border: 0; color: #fff; cursor: pointer; font-size: 11px; font-weight: 800;
}
.mscout-act-icon {
	width: 48px; height: 48px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center;
	background: rgba(0, 0, 0, .45); font-size: 21px; backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, .18); transition: transform .12s, background .12s;
}
.mscout-act:hover .mscout-act-icon, .mscout-act:focus-visible .mscout-act-icon { transform: scale(1.08); }
.mscout-act[aria-pressed="true"] .mscout-act-icon { background: #f8107d; border-color: #f8107d; }
.mscout-dislike[aria-pressed="true"] .mscout-act-icon { background: #4b5b75; border-color: #4b5b75; }
.mscout-act-label { text-shadow: 0 1px 4px rgba(0, 0, 0, .7); max-width: 72px; text-align: center; }

.mscout-sheet {
	position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
	max-width: 520px; margin: 0 auto; padding: 14px; border-radius: 16px;
	background: rgba(14, 19, 28, .96); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
}
.mscout-sheet[hidden] { display: none; }
.mscout-sheet-title { font-weight: 900; margin-bottom: 10px; }

.mscout-swatch {
	display: grid; grid-template-columns: 16px minmax(60px, auto) 1fr auto; align-items: center; gap: 10px;
	width: 100%; padding: 7px 8px; margin-bottom: 4px; border-radius: 10px;
	border: 1px solid transparent; background: rgba(255, 255, 255, .04); color: inherit; cursor: pointer; text-align: left;
}
.mscout-swatch:hover, .mscout-swatch:focus-visible { border-color: var(--swatch); }
.mscout-swatch[aria-pressed="true"] { border-color: var(--swatch); background: rgba(255, 255, 255, .1); }
.mscout-swatch-dot { width: 16px; height: 16px; border-radius: 999px; background: var(--swatch); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.mscout-swatch-label { font-weight: 800; font-size: 13px; }
.mscout-swatch-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.mscout-swatch-fill { display: block; height: 100%; background: var(--swatch); }
.mscout-swatch-count { font-size: 12px; color: #9fb0c8; min-width: 18px; text-align: right; }

.mscout-panel { padding: 14px; margin-bottom: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.mscout-panel-title { margin: 0 0 10px; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #9fb0c8; }
.mscout-muted { color: #9fb0c8; font-size: 13px; margin: 0 0 10px; }
.mscout-artist-card { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.mscout-avatar-lg { grid-row: span 2; width: 56px; height: 56px; border-radius: 999px; object-fit: cover; }
.mscout-artist-name { font-weight: 900; font-size: 16px; }
.mscout-artist-card .mscout-muted { margin: 0; }
.mscout-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(248, 16, 125, .16); color: #ffd1e6; font-weight: 800; font-size: 12px; text-decoration: none; }
.mscout-stats { margin: 10px 0 0; font-weight: 800; white-space: pre; }
.mscout-value { font-size: 13px; line-height: 1.5; margin: 0 0 12px; color: #d6e0ee; }
.mscout-allowance { font-weight: 900; font-size: 15px; margin: 0; }

.mscout-btn {
	display: block; text-align: center; padding: 10px 14px; margin-top: 8px; border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-weight: 800; text-decoration: none;
}
.mscout-btn-primary { background: #f8107d; border-color: #f8107d; }
.mscout-btn:hover, .mscout-btn:focus-visible { filter: brightness(1.1); }

.mscout-queue { list-style: none; margin: 0; padding: 0; }
.mscout-queue-item {
	display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; width: 100%;
	padding: 6px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; text-align: left;
}
.mscout-queue-item:hover, .mscout-queue-item:focus-visible { background: rgba(255, 255, 255, .07); }
.mscout-queue-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.mscout-queue-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.mscout-queue-text strong, .mscout-queue-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mscout-queue-text span { color: #9fb0c8; }

.mscout-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 10002;
	padding: 10px 16px; border-radius: 999px; background: #fff; color: #111; font-weight: 800;
	opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.mscout-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.mscout-guest { position: fixed; inset: 0; z-index: 10001; display: none; place-items: center; background: rgba(0, 0, 0, .7); }
.mscout-guest.is-visible { display: grid; }
.mscout-guest-card { width: min(90vw, 360px); padding: 24px; border-radius: 18px; background: #151c28; text-align: center; }
.mscout-guest-card h2 { margin: 0 0 8px; }
.mscout-guest-card p { color: #9fb0c8; margin: 0 0 12px; }
.mscout-guest-dismiss { margin-top: 12px; background: none; border: 0; color: #9fb0c8; cursor: pointer; font-weight: 800; }

/* Desktop: reel in the middle, persistent context on both sides. */
@media (min-width: 1100px) {
	.mscout { grid-template-columns: minmax(260px, 340px) 1fr minmax(260px, 340px); }
	.mscout-hint { display: block; }
	.mscout-side { display: block; overflow-y: auto; padding: 16px; scrollbar-width: thin; }
	.mscout-colour { display: none; }
	.mscout-sheet { display: none !important; }
	.mscout-rail { right: auto; left: calc(100% + 16px); bottom: 16px; }
	.mscout-meta { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.mscout, .mscout *, .mscout *::before { animation: none !important; transition: none !important; }
	.mscout-burst { display: none; }
}
