/* ============================================================ */
/* 1. VARIABLES                                                  */
/* ============================================================ */

/* To reskin, change only this block: every colour and font of the public CSS (index.css,
   content.css, news.css, and the note in the admin preview, admin/preview.css) comes from it. */
:root {
	/* palette */
	--ink: #1C2A44;
	--ink-soft: #5A6680;
	--white: #FFFFFF;
	--lilac: #C9A2D1;
	--periwinkle: #7B78C8;
	--placeholder: #E3E8F0;
	--tint: #EEF3FC;
	--line: #D6DEF0;
	--line-soft: #E3E8F0;
	--footer-line: #D9E2F0;
	--frame-line: #AFBCDD;
	--live: #B6F6EB;
	--offline: #D5DAE3;

	/* surfaces */
	--page-bg: linear-gradient(180deg, #EEF6FA 0%, #F2F0FA 100%);
	--header-bg:
		radial-gradient(ellipse 45% 70% at 12% 35%, rgba(182, 246, 235, 0.85), transparent 70%),
		radial-gradient(ellipse 40% 90% at 38% 0%, rgba(190, 213, 245, 0.9), transparent 70%),
		radial-gradient(ellipse 35% 80% at 68% 15%, rgba(216, 201, 250, 0.8), transparent 70%),
		radial-gradient(ellipse 50% 80% at 92% 85%, rgba(240, 203, 249, 0.9), transparent 70%),
		linear-gradient(160deg, #DCF6FB 0%, #C9DDF7 45%, #E6D3FA 100%);
	--card: rgba(255, 255, 255, 0.88);
	--banner-bg: rgba(255, 255, 255, 0.6);
	--bar: rgba(255, 255, 255, 0.75);
	--schedule-bg: linear-gradient(135deg, #D6F4F8 0%, #D3DDF8 55%, #E3D6FA 100%);
	--snowflake-bg: linear-gradient(160deg, #D9EEFB 0%, #D8D6F8 60%, #EDD9F8 100%);
	--clip-bg: linear-gradient(135deg, #2E3B5A 0%, #4B4F86 100%);
	--support-bg: linear-gradient(120deg, #D6F4F8 0%, #D3DDF8 50%, #EBD7FA 100%);
	--credit-bg: linear-gradient(rgba(28, 42, 68, 0), rgba(28, 42, 68, 0.72));
	--caption-bg: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
	--day-mon: #CEF7F8;
	--day-tue: #D1EDF8;
	--day-wed: #D0E4F8;
	--day-thu: #C8D6F8;
	--day-fri: #CFD3F8;
	--day-sat: #DBCDFA;
	--day-sun: #E7D6FA;

	/* the note above the admin preview (admin/preview.css) */
	--note-bg: #FFF4D6;
	--note-ink: #5A4A1A;

	/* type, shapes, depth */
	--font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
	--card-radius: 1em;
	--card-shadow: 0 4px 18px rgba(28, 42, 68, 0.08);
	--bar-shadow: 0 2px 10px rgba(28, 42, 68, 0.08);
	--disc-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	--gutter: clamp(1em, 2vw, 5em);
}
HEADER {
	--pad: 1em;
	--hero: clamp(8em, 22vw, 20em);
}
MAIN {
	--title-gap: .5625rem;
}
MAIN .schedule {
	--day: clamp(4em, 7vw, 10em);
	--gap: 1em;
}

.twitter   { --icon: url('../icons/x.svg'); }
.facebook  { --icon: url('../icons/facebook.svg'); }
.tiktok    { --icon: url('../icons/tiktok.svg'); }
.youtube   { --icon: url('../icons/youtube.svg'); }
.twitch    { --icon: url('../icons/twitch.svg'); }
.discord   { --icon: url('../icons/discord.svg'); }
.instagram { --icon: url('../icons/instagram.svg'); }
.kofi      { --icon: url('../icons/kofi.svg'); }

/* ============================================================ */
/* 2. GLOBAL STRUCTURE                                           */
/* ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

HTML { min-height: 100%; }

HEADER, FOOTER, .content, MAIN, NAV, ASIDE { min-width: 0; }
HEADER, NAV, ASIDE { display: flex; }

BODY {
	display: grid;
	min-height: 100vh;
	margin: 0;
	grid-template-columns:
		[full-start] var(--gutter)
		[content-start] minmax(0, 1fr)
		[content-end] var(--gutter)
		[full-end];
	grid-template-rows:
		[header-start] auto
		[header-end main-start] 1fr
		[main-end footer-start] auto
		[footer-end];
}

HEADER { grid-column: full;    grid-row: header; }
MAIN   { grid-column: content; grid-row: main; }
FOOTER { grid-column: content; grid-row: footer; }

MAIN {
	display: grid;
	grid-template-columns: 1fr auto;
	align-content: start;
	gap: 2em;
	padding: 2em 0;
}
MAIN > * { grid-column: 1 / -1; }
MAIN > .half { grid-column: auto; }

/* ============================================================ */
/* 3. GLOBAL STYLE                                              */
/* ============================================================ */

BODY {
	font-family: var(--font);
	color: var(--ink);
	background: var(--page-bg);
}

MAIN > * {
	padding: 1.25em;
	padding-top: .9375em;
	border-radius: var(--card-radius);
	background: var(--card);
	box-shadow: var(--card-shadow);
}
MAIN > * > .title {
	margin-bottom: 0;
	font-size: 2em;
	font-weight: 800;
	line-height: 1;
	color: var(--ink);
}

/* ============================================================ */
/* 4. LOCAL STRUCTURE                                           */
/* ============================================================ */

/* ---- Banner ---- */

HEADER { flex-direction: column; }
HEADER .top-banner {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 1em;
	padding: .4em calc(var(--pad) + 1.25em);
}

/* one status at a time: data-status="live" or "offline" on the banner hides the other group */

HEADER .top-banner .when-live,
HEADER .top-banner .when-offline { display: flex; align-items: center; gap: .6em; }
HEADER .top-banner[data-status="live"] .when-offline,
HEADER .top-banner[data-status="offline"] .when-live { display: none; }

/* ---- Nav ---- */

HEADER NAV.navbar {
	display: flex;
	flex-flow: row wrap;
	justify-content: space-between;
	align-items: center;
	gap: .5em 1.25em;
	margin: var(--pad) var(--pad) 0;
	padding: .6em 1.25em;
}
HEADER NAV.navbar .title { margin-right: 0; }
HEADER NAV.navbar .nav-support { margin-left: 0; }

/* phone menu parts hidden until the 1100px breakpoint */

HEADER NAV.navbar .nav-toggle,
HEADER NAV.navbar .nav-burger { display: none; }

/* ---- Hero ---- */

HEADER .hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--hero);
	gap: var(--pad);
	padding: var(--pad);
	padding-right: calc(var(--gutter) + 1.25em);
}
HEADER .hero .intro {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: .5em;
	padding-left: calc(var(--gutter) + 1.25em - var(--pad));
}
HEADER .hero .links {
	display: flex;
	flex-wrap: wrap;
	gap: .5em;
}
HEADER .hero .links .item {
	display: inline-flex;
	align-items: center;
	gap: .5em;
}
HEADER .hero .character-image {
	width: var(--hero);
	aspect-ratio: 1;
}

/* ---- Schedule ---- */

MAIN .schedule {
	display: grid;
	grid-template-columns: minmax(calc(var(--day) * 1.5), 1fr) auto;
	gap: 0;
	align-content: start;
	padding-bottom: 0;
}
MAIN .schedule .title { grid-column: 1 / -1; }
MAIN .schedule > .title { margin-bottom: var(--title-gap); }

MAIN .schedule .wrapper {
	display: grid;
	grid-template-rows: 1fr auto 1fr 0 auto 2fr;
	justify-content: stretch;
	justify-items: center;
	align-items: center;
	align-content: stretch;
	gap: 0;
	padding: .5em var(--gap);
	border: 2px solid transparent;
	container-type: inline-size;
}
MAIN .schedule .wrapper .title { grid-row: 2; }
MAIN .schedule .wrapper .timer {
	grid-row: 5;
	display: flex;
	align-items: center;
}

MAIN .schedule .weekday {
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: center;
	align-content: stretch;
	gap: var(--gap);
	padding: var(--gap);
	padding-top: .5em;
}
MAIN .schedule .weekday .day {
	flex: none;
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	align-content: center;
	gap: .5em;
	width: var(--day);
}
MAIN .schedule .weekday .day .item {
	flex: none;
	aspect-ratio: 1;
	width: 100%;
	height: auto;
}
MAIN .schedule .disclaimer {
	grid-column: 1 / -1;
	justify-self: end;
	padding: .6em 0;
}

/* ---- Gallery ---- */

MAIN .art-gallery {
	display: flex;
	flex-direction: column;
	gap: var(--title-gap);
	container-type: inline-size;
}

MAIN .art-gallery .wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, 7em);
	grid-template-rows: 7em 7em;
	grid-auto-rows: 7em;
	gap: 1em;
	justify-content: space-between;
	height: calc(7em * 2 + 1em);
	overflow: hidden;
}
MAIN .art-gallery .wrapper .item { aspect-ratio: 1; }
MAIN .art-gallery .view {
	align-self: center;
	margin-top: calc(1.25rem - var(--title-gap));
	padding: 0 1.2em;
	line-height: 1.5em;
}

/* ---- Snowflake ---- */

MAIN .snowflake {
	display: flex;
	flex-direction: column;
	gap: var(--title-gap);
}

MAIN .snowflake .card {
	flex: none;
	align-self: center;
	width: calc(7em * 2 + 1em + 1.25em + 1.35em);
	aspect-ratio: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: .5em;
}

/* ---- Clips ---- */

MAIN .clips {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
	grid-template-rows: auto auto;
	grid-auto-rows: 0;
	gap: 0 1em;
	padding-bottom: 0;
	border-bottom: 1.25em solid transparent;
	overflow: hidden;
}
MAIN .clips > .title {
	grid-column: 1 / -1;
	margin-bottom: var(--title-gap);
	padding-bottom: 0;
}
MAIN .clips .item {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
MAIN .clips .item > * { display: none; }

/* ---- FAQ ---- */

MAIN .faq > .title { margin-bottom: var(--title-gap); }
MAIN .faq .item {
	margin-top: .6em;
	padding: .6em 1em;
}
MAIN .faq .item:first-of-type { margin-top: 0; }
MAIN .faq .item P { margin: .5em 0 0; }

/* ---- Support ---- */

MAIN .support {
	padding-top: 1em;
	padding-bottom: 1em;
}
MAIN .support .wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	align-content: stretch;
	gap: 0 .5em;
	padding: 0 1em;
}

/* ---- Footer ---- */

FOOTER {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	align-content: stretch;
	padding: 1em 0;
}
FOOTER .socials {
	justify-self: start;
	display: flex;
	flex-flow: row nowrap;
	gap: 1px;
}
FOOTER .socials .item {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	align-content: center;
	width: calc(1.3rem + 8px);
	height: calc(1.3rem + 8px);
}
FOOTER .socials .item::before {
	content: '';
	width: 1.3rem;
	height: 1.3rem;
}
FOOTER .contact {
	justify-self: center;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	align-content: center;
}
FOOTER .copyright {
	justify-self: end;
	display: inline-flex;
	justify-content: flex-end;
	align-items: center;
	align-content: center;
}

/* ============================================================ */
/* 5. LOCAL STYLE                                               */
/* ============================================================ */

/* ---- Header (aurora background) ---- */

HEADER {
	color: var(--ink);
	background: var(--header-bg);
}

/* ---- Banner ---- */
HEADER .top-banner { background: var(--banner-bg); }
HEADER .top-banner .status {
	padding: .15em .8em;
	border-radius: 999px;
	font-size: .85em;
	font-weight: 600;
}
HEADER .top-banner .when-live .status    { background: var(--live); color: var(--ink); }	/* teal: live */
HEADER .top-banner .when-offline .status { background: var(--offline); color: var(--ink-soft); }		/* gray: offline */
HEADER .top-banner .watch {
	padding: .15em .8em;
	border-radius: 999px;
	background: var(--ink);
	color: var(--white);
	font-size: .85em;
	font-weight: 600;
	text-decoration: none;
}
HEADER .top-banner .next { font-size: .85em; font-weight: 600; color: var(--ink-soft); }

/* ---- Nav ---- */

HEADER NAV.navbar {
	border-radius: 1em;
	background: var(--bar);
	box-shadow: var(--bar-shadow);
	font-size: 1.1em;
}
HEADER NAV.navbar > div { font-weight: 800; }
HEADER NAV.navbar > div:not(.title) { font-size: 1.25em; }
/* A nav item that is a link looks exactly like the plain labels of the hand-built page (no hover of its own). */
HEADER NAV.navbar > div > a { color: inherit; text-decoration: none; }
HEADER NAV.navbar > div > a:focus-visible { outline: 2px solid var(--lilac); outline-offset: 2px; border-radius: .3em; }
HEADER NAV.navbar .title {
	font-size: 1.6em;
	font-weight: bold;
}
HEADER NAV.navbar .nav-support {
	padding: .4em 1.2em;
	border: none;
	border-radius: 999px;
	background: var(--lilac);
	color: var(--white);
	font: inherit;
	font-weight: bold;
	cursor: pointer;
}

/* ---- Hero ---- */

HEADER .hero .title {
	font-size: clamp(2.5em, 6vw, 4.5em);
	font-weight: bold;
	line-height: 1;
}
HEADER .hero .links .item {
	padding: .5em 1.4em;
	border-radius: 999px;
	background: var(--ink);
	color: var(--white);
	font-size: 1em;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
HEADER .hero .links .item::before {
	content: '';
	width: 1.1em;
	height: 1.1em;
	background: var(--white);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}
HEADER .hero .character-image {
	border: 2px dashed var(--frame-line);
	border-radius: 1em;
}

/* ---- Schedule ---- */

MAIN .schedule .wrapper {
	border-radius: var(--card-radius) 0 0 var(--card-radius);
	background: var(--schedule-bg);
	background-origin: border-box;
}
MAIN .schedule .wrapper .title {
	font-size: 1.1em;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}
MAIN .schedule .wrapper .timer {
	font-size: min(28.15cqi, calc(var(--day) * 0.6));
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	line-height: 1;
}
MAIN .schedule .weekday {
	border: 2px solid var(--line);
	border-left: none;
	border-radius: 0 var(--card-radius) var(--card-radius) 0;
}
MAIN .schedule .weekday .day .name {
	font-size: 1.1em;
	font-weight: 800;
	color: var(--ink);
}
MAIN .schedule .weekday .day .item { border-radius: .6em; }
MAIN .schedule .weekday .day.mon .item { background: var(--day-mon); }
MAIN .schedule .weekday .day.tue .item { background: var(--day-tue); }
MAIN .schedule .weekday .day.wed .item { background: var(--day-wed); }
MAIN .schedule .weekday .day.thu .item { background: var(--day-thu); }
MAIN .schedule .weekday .day.fri .item { background: var(--day-fri); }
MAIN .schedule .weekday .day.sat .item { background: var(--day-sat); }
MAIN .schedule .weekday .day.sun .item { background: var(--day-sun); }
MAIN .schedule .disclaimer { font-size: .8em; color: var(--ink-soft); }

/* ---- Gallery ---- */

MAIN .art-gallery .wrapper .item {
	border-radius: .6em;
	background: var(--placeholder);
}
MAIN .art-gallery .view {
	border-radius: 999px;
	background: var(--periwinkle);
	color: var(--white);
	font-size: .9em;
	font-weight: 600;
	cursor: pointer;
}

/* ---- Snowflake ---- */

MAIN .snowflake .card {
	border-radius: .6em;
	background: var(--snowflake-bg);
	text-align: center;
}
MAIN .snowflake .name { font-weight: 800; }
MAIN .snowflake .message { font-size: .85em; color: var(--ink-soft); }

/* ---- Clips ---- */

MAIN .clips .item {
	border-radius: .6em;
	background: var(--clip-bg);
}
MAIN .clips .item::before {	/* white disc */
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 2.4em;
	height: 2.4em;
	border-radius: 50%;
	background: var(--white);
	box-shadow: var(--disc-shadow);
}
MAIN .clips .item::after { content: none; }
MAIN .clips .item:empty::after {	/* play triangle */
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	transform: translateX(.12em);
	width: .9em;
	height: 1em;
	border-radius: 50%;
	background: var(--ink);
	box-shadow: var(--disc-shadow);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* ---- FAQ ---- */

MAIN .faq .item {
	border-radius: .6em;
	background: var(--tint);
}
MAIN .faq .item SUMMARY { font-weight: 600; cursor: pointer; }
MAIN .faq .item P { color: var(--ink-soft); }

/* ---- Support ---- */

MAIN .support { background: var(--support-bg); }
MAIN .support .wrapper BUTTON,
MAIN .support .wrapper A {
	padding: .5em 1.4em;
	border: none;
	border-radius: 999px;
	background: var(--ink);
	color: var(--white);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
MAIN .support .wrapper BUTTON { font: inherit; font-weight: 600; }

/* ---- Footer ---- */

FOOTER {
	border-top: 1px solid var(--footer-line);
	color: var(--ink-soft);
	font-size: .9em;
}
FOOTER .socials .item {
	border-radius: 50%;
	background: transparent;
	color: var(--white);
	font-size: 0;
	font-weight: 800;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
FOOTER .socials .item::before {
	background: var(--ink);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}
FOOTER .contact { text-align: center; }
FOOTER .contact A:link,
FOOTER .contact A:visited { color: var(--ink); font-weight: 600; text-decoration: none; }
FOOTER .copyright { text-align: right; }

/* ============================================================ */
/* 6. MEDIA QUERIES                                              */
/* ============================================================ */

/* ---- 1100px: nav collapses to the site title + hamburger ---- */

@media (max-width: 1100px) {
	HEADER NAV.navbar { justify-content: flex-start; }
	HEADER NAV.navbar .nav-burger {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-left: auto;
		width: 2.4em;
		height: 2.4em;
		border-radius: .6em;
		cursor: pointer;
	}
	HEADER NAV.navbar .nav-burger span {
		width: 1.3em;
		height: 3px;
		border-radius: 2px;
		background: var(--ink);
		box-shadow: 0 -7px 0 var(--ink), 0 7px 0 var(--ink);
	}
	HEADER NAV.navbar > div:not(.title),
	HEADER NAV.navbar > .nav-support { display: none; }

	HEADER NAV.navbar .nav-toggle:checked ~ div:not(.title) {
		display: block;
		flex-basis: 100%;
		padding: .5em 0;
		border-top: 1px solid var(--line-soft);
	}
	HEADER NAV.navbar .nav-toggle:checked ~ .nav-support {
		display: block;
		margin-top: .5em;
		margin-left: auto;
		margin-right: auto;
	}
	HEADER NAV.navbar .nav-toggle:checked + .nav-burger { background: var(--line-soft); }
}

/* ---- 900px: schedule stacks (card on top, days below) ---- */

@media (max-width: 900px) {
	MAIN .schedule { grid-template-columns: minmax(0, 1fr); }
	MAIN .schedule .weekday {
		min-width: 0;
		border-left: 2px solid var(--line);
		border-top: none;
		border-radius: 0 0 var(--card-radius) var(--card-radius);
	}
	MAIN .schedule .weekday .day { flex: 1; width: auto; min-width: 0; }
	MAIN .schedule .wrapper { border-radius: var(--card-radius) var(--card-radius) 0 0; }
	MAIN .schedule .disclaimer { justify-self: center; }
}

/* ---- 768px: gallery and snowflake stack ---- */

@media (max-width: 768px) {
	MAIN > .half { grid-column: 1 / -1; }
	MAIN .art-gallery .wrapper {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: none;
		grid-auto-rows: calc((100cqi - 2em) / 3);
		justify-content: stretch;
		height: calc((100cqi - 2em) / 3 * 2 + 1em);
	}
	MAIN .snowflake .card { width: min(100%, 14em); }
}

/* ---- 500px: tighter schedule gaps ---- */

@media (max-width: 500px) {
	MAIN .schedule { --gap: .5em; }
}

/* ---- 470px: footer too tight for equal sides (icons 178px + Contact 75px each side of centre) ----
   centre Contact Me in the space between the icons and the copyright instead */

@media (max-width: 470px) {
	FOOTER { grid-template-columns: auto 1fr auto; }
}