/* ==========================================================================
   Memory Unlocked: Xbox 360-style notification (right side, centred about 70% up the screen).
   The oval grows out of the round icon by animating clip-path, so the icon is never stretched.
   ========================================================================== */
.sg-mem { --mem-icon: 86px; --mem-pad: 12px; position: fixed; top: 30vh; top: 30dvh; transform: translateY(-50%); right: 16px; z-index: 9000; display: none; width: min(620px, calc(100vw - 32px));
	align-items: center; gap: 16px; padding: var(--mem-pad) 52px var(--mem-pad) var(--mem-pad); min-height: calc(var(--mem-icon) + var(--mem-pad) * 2); box-sizing: border-box;
	font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: #fff; filter: drop-shadow(0 8px 16px rgba(0,0,0,.45)); pointer-events: none; }
.sg-mem.is-on { display: flex; }
.sg-mem.is-open { pointer-events: auto; }

/* the glossy charcoal oval */
.sg-mem__pill { position: absolute; inset: 0; border-radius: 999px; opacity: 0;
	background:
		linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.06) 46%, rgba(255,255,255,0) 50%, rgba(0,0,0,.12) 100%),
		linear-gradient(180deg, #62665f 0%, #474a45 40%, #353833 60%, #2a2c28 100%);
	box-shadow: inset 0 0 0 1.5px rgba(196,202,190,.6), inset 0 2px 1px rgba(255,255,255,.28), inset 0 -2px 3px rgba(0,0,0,.35);
	clip-path: inset(var(--c-t, 0) var(--c-r, 80%) var(--c-b, 0) var(--c-l, 0) round 999px);
	transition: clip-path 450ms cubic-bezier(.25,.8,.25,1), opacity 90ms linear; }
.sg-mem.is-open .sg-mem__pill { opacity: 1; clip-path: inset(0 0 0 0 round 999px); }
.sg-mem.is-closing .sg-mem__pill { opacity: 1; transition: clip-path 450ms cubic-bezier(.55,0,.75,.2), opacity 120ms linear 330ms; opacity: 0; }

/* the round icon: scales evenly (never stretched) */
.sg-mem__icon { position: relative; z-index: 2; flex: none; width: var(--mem-icon); height: var(--mem-icon); border-radius: 50%; transform: scale(.25); opacity: 0;
	transition: transform 300ms cubic-bezier(.2,1.25,.35,1), opacity 220ms ease-out; }
.sg-mem.is-icon .sg-mem__icon { transform: scale(1); opacity: 1; }
.sg-mem.is-closing .sg-mem__icon { transform: scale(.25); opacity: 0; transition: transform 200ms ease-in 250ms, opacity 200ms ease-in 250ms; }

/* text */
.sg-mem__text { position: relative; z-index: 2; min-width: 0; opacity: 0; transition: opacity 200ms linear; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.sg-mem.is-text .sg-mem__text { opacity: 1; }
.sg-mem__text p { margin: 0; }
.sg-mem__title { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: .005em; margin-bottom: 3px !important; }
.sg-mem__line { font-size: 15.5px; line-height: 1.38; color: #f2f3f0; }
.sg-mem__cap { color: #e3e6df; }
.sg-mem.is-anniversary .sg-mem__title { color: #c6ff4a; }

/* the small white ✕ on the far right */
.sg-mem__x { position: absolute; z-index: 3; right: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: rgba(255,255,255,.6); cursor: pointer; opacity: 0; transition: opacity 200ms linear, color .15s ease, background .15s ease; }
.sg-mem.is-text .sg-mem__x { opacity: 1; }
.sg-mem__x:hover, .sg-mem__x:focus-visible { color: #fff; background: rgba(255,255,255,.14); outline: none; }
.sg-mem__x:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.75); }

/* phones: still an oval, just smaller */
@media (max-width: 600px) {
	.sg-mem { --mem-icon: 52px; --mem-pad: 9px; right: 8px; width: calc(100vw - 16px); gap: 9px; padding-right: 34px; }
	.sg-mem__title { font-size: 15.5px; margin-bottom: 1px !important; }
	.sg-mem__line { font-size: 11.8px; line-height: 1.3; letter-spacing: -.005em; }
	.sg-mem__x { right: 7px; width: 26px; height: 26px; margin-top: -13px; }
}
@media (max-width: 360px) { .sg-mem__line { font-size: 11.6px; } }

/* Reduce animations (Settings) / reduced motion: appear and disappear without movement */
.sg-mem.is-calm .sg-mem__pill, .sg-mem.is-calm .sg-mem__icon, .sg-mem.is-calm .sg-mem__text, .sg-mem.is-calm .sg-mem__x { transition: none !important; }

/* On game and video pages the pop-up sits at the bottom, clear of the Favorite / Fullscreen buttons and the player (2026-11-28). */
body.single-sg_game .sg-mem, body.sg-tube-page .sg-mem { top: auto; bottom: 20px; transform: none; }
