html, body {
	margin: 0;
	padding: 0;
	height: 100%;
}

:root {
	--frame-width: 1200px;
	--sidebar-width: 12px;
	--font-heading: "Courier New", Courier, monospace;
	--font-ui: "Orbitron", Arial, Helvetica, sans-serif;
	--font-body: "Courier New", Courier, monospace;
	--turntable-size: 192px;
	--turntable-center-width: 384px;
	--turntable-pad-x: 0px;
	--turntable-pad-y: 16px;
}

.site-frame {
	width: var(--frame-width);
	margin: 0 auto;
	background: #000;
	position: relative;
	z-index: 1;
}

.site-frame::before,
.site-frame::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--sidebar-width);
	pointer-events: none;
	z-index: 3;

	background-image: url("images/sidebar_left.png");
	background-repeat: repeat;
}

/* Left sidebar */
.site-frame::before {
	left: 0;
}

/* Right sidebar */
.site-frame::after {
	right: 0;
	transform: scaleX(-1);
}

body {
	background-color: #000;
	background-image: url("images/background.png");
	background-repeat: repeat;
	background-position: top-left;
	
	color: #fff;
	font-family: var(--font-body);
	display: flex;
	flex-direction: column;
}

.panel {
	border: 2px solid #660000;
	background-color: #220000;
}

p {
	line-height: 1.5;
	font-size: 1.0rem;
	color: #e0e0e0;
}

a {
	color: #e9e900;
	text-decoration: none;
}

.bold-text {
	font-weight: 800;
}

a:hover {
	color: #ffff00;
	text-decoration: underline;
}

a.ge-link {
	display: inline-block;
	color: #ff4444;
	text-decoration: none;
	position: relative;
	font-weight: 800;
	letter-spacing: 0.06em;
	transition: color 0.15s linear, text-shadow 0.15s linear;
}


a.ge-link.ge-inline {
	display: inline-block;
	width: fit-content;
}

a.ge-link:hover,
a.ge-link:focus-visible {
	color: #ff4444;

	text-shadow:
		0 0 3px rgba(255, 0, 0, 0.6),
		0 0 6px rgba(255, 0, 0, 0.35);
}

a.ge-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;

	background: linear-gradient(
		to right,
		#dd0000,
		#ff0000,
		#dd0000
	);

	opacity: 0.5;
	transition:
		opacity 0.15s linear,
		height 0.15s linear;
}

a.ge-link:hover::after,
a.ge-link:focus-visible::after {
	opacity: 1;
}

a.ge-link:focus-visible {
	outline: 1px solid #ff5555;
	outline-offset: 3px;
}

a.ge-link:visited {
	color: #ff4444;
}

a.ge-link:visited::after {
	opacity: 0.25;
}

.gold-text {
	color: #d4af37;
	text-shadow: 0 0 6px rgba(212, 175, 55, 1);
	padding-right: 1px;
}

.yellow-text {
	color: #ffff00;
}

.red-text {
	color: #ff0000;
}

.image-centered {
	display: block;
	margin: 0 auto;
}

.image-red-border {
	border: 1px solid #660000;
	margin-bottom: 4px;
}

figcaption {
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
	padding-right: 20px;
	text-align: center;
}

/* =========================
   Banner
   ========================= */

.site-banner {
	position: relative;
	width: 100%;
	max-height: 420px;
	overflow: hidden;
}

.site-banner .banner-bg {
	width: 100%;
	height: 420px;
	object-fit: cover;
	display: block;
}

.site-banner .banner-logo {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, 75%);
	max-width: 80%;
	max-height: 70%;
	height: auto;
	width: auto;
	pointer-events: none;
}

/* =========================
   Navigation Bar
   ========================= */

.site-nav {
	background-color: #000;
	position: relative;
	
	padding-left: calc(var(--sidebar-width));
    padding-right: calc(var(--sidebar-width));
}

.site-nav a {
	font-family: var(--font-ui);
	letter-spacing: 0.01em;
}

.site-nav::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;

	background-image: url("images/bg-scanline.png");
	background-repeat: repeat;
	background-position: top left;

	opacity: 1.0;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding-top: 0px;
	padding-bottom: 10px;
	padding-right: 20px;
	padding-left: 20px;

	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 8px 16px;

	border: 2px solid #660000;
	z-index: 2;
	position: relative;
}

.site-nav li {
	display: flex;
}

.site-nav a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;

	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;

	background-color: #220000;
	
	padding: 0;
	
	margin-top: 4px;
	margin-bottom: 4px;

	border-top: 1px solid #660000;
	border-left: 1px solid #660000;
	border-right: 1px solid #660000;
	border-bottom: 1px solid #660000;

	border-radius: 2px;
	
	box-shadow:
    inset 0 2px 0 rgba(255, 80, 80, 0.1),  /* top highlight */
    inset 0 -2px 0 rgba(0, 0, 0, 0.6);        /* bottom shadow */
}

.site-nav a:hover {
	background-color: #800;
	text-decoration: none;
	box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.7);
}

.site-nav a.active {
	background-color: #880000;
	border-top: 2px solid #ff0000;
	transform: translateY(1px);
	box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.7);
}

/* =========================
   Main
   ========================= */
   
main {
	position: relative;
	flex: 1;
	padding-bottom: 20px;
	padding-left: calc(var(--sidebar-width) + 24px);
    padding-right: calc(var(--sidebar-width) + 24px);
	
	padding-top: calc(
		var(--turntable-offset)
		+ var(--turntable-size)
		+ var(--turntable-gap)
    );
}

main h1,
main h2 {
	font-size: 2.5rem;
	font-family: var(--font-heading);
	letter-spacing: 0.02em;
}

main h1 {
	margin: 0 0 50px 0;
	text-align: center;
}

main h1.h1--tight {
	margin-top: 0px;
	margin-bottom: 24px;
}

main h3 {
	margin: 8px 0 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding-bottom: 6px;
	border-bottom: 1px solid #660000;
}

main h3::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	background: #aa0000;
	margin-right: 10px;
	transform: translateY(-2px);
}

.page-title {
    background: linear-gradient(
        180deg,
        #3a0000 0%,
        #1a0000 100%
    );

    border: 6px double #660000;

    color: #ffcc00;
    font-weight: bold;
    letter-spacing: 0.03em;

    box-shadow:
        0 0 12px rgba(160, 0, 0, 0.7),
        inset 0 0 6px rgba(0, 0, 0, 0.6);

    text-shadow:
        0 1px 0 #3a2000,
        0 0 4px rgba(255, 215, 128, 0.6),
        0 0 8px rgba(255, 200, 80, 0.35);
}

.page-title--extra-margin {
	margin-top: 50px;
}

.home-title {
    background: linear-gradient(
        180deg,
        #3a0000 0%,
        #1a0000 100%
    );

    border: 6px double #660000;

    box-shadow:
        0 0 12px rgba(160, 0, 0, 0.7),
        inset 0 0 6px rgba(0, 0, 0, 0.6);
}

main a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-thickness 0.15s ease, color 0.15s ease;
}

main a:hover {
	color: #ffff00;
	text-decoration-thickness: 3px;
}

main a:visited {
	color: #b38cff;
}

.main-subtitle {
	margin: 60px 0 0 0;
	color: #ffcc00;
	font-family: var(--font-heading);
	font-size: 2.0rem;
	
	text-shadow:
	2px 2px 0 #5a4300,
	-1px -1px 0 rgba(255,226,138,0.8);
}

.main-subtitle--short {
	margin-top: 24px;
}

.main-subtitle--tight {
	margin: 0px;
}

.main-ornaments {
	position: relative;
	height: calc(var(--turntable-size) + (var(--turntable-pad-y) * 2));
	padding: 0px var(--turntable-pad-x);
	margin: 0;

	background: transparent;
}

.main-ornaments {
	padding-left: calc(var(--sidebar-width) + var(--turntable-pad-x));
	padding-right: calc(var(--sidebar-width) + var(--turntable-pad-x));
}

.turntable {
	position: absolute;
	top: var(--turntable-pad-y);
	width: var(--turntable-size);
	height: auto;

	pointer-events: none;
}

.turntable--left {
	left: calc(var(--sidebar-width) + var(--turntable-pad-x));
}

.turntable--right {
	right: calc(var(--sidebar-width) + var(--turntable-pad-x));
	transform: scaleX(-1);
}

.turntable--center {
	left: 50%;
	transform: translateX(-50%);
	width: var(--turntable-center-width);
}

@media (max-width: 900px) {
	.main-ornaments {
		display: none;
	}
}

/* =========================
   Contents Panel
   ========================= */
   
.contents {
	margin-top: 24px;
	position: relative;
	overflow: hidden;
	padding: 12px;
	background-color: #220000;
	
	border: 6px double #660000;
	box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.10),
    inset 0 -2px 0 rgba(0, 0, 0, 0.65);
}

.contents::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.contents > * {
	position: relative;
	z-index: 1; /* put text on top of scanlines */
}

.contents-title {
	margin: 0px 0 10px 0;
	font-family: var(--font-ui);
	font-size: 1.5rem;
	letter-spacing: 0.1em;
	color: #ffcc00;
	
	padding-bottom: 6px;
    border-bottom: 2px solid rgba(102, 0, 0, 0.9);
	
	text-shadow:
	2px 2px 0 #5a4300,
	-1px -1px 0 rgba(255,226,138,0.8);
}

.contents-title--extramargin {
	margin-top: 20px;
}

.contents-grid {
	list-style: none;
	margin: 0;
	padding: 0 16px 0 0;
	
	text-align: center;
	font-family: var(--font-ui);
	letter-spacing: 0.1em;

	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px 30px;
}

.contents-grid li {
	margin: 0;
}

.contents-grid a {
	display: block;
	width: 100%;
	padding: 3px 7px;
	border-radius: 3px;

	color: #e9e900;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;

	border: 1px solid rgba(102, 0, 0, 0.9);
	background-color: rgba(0, 0, 0, 0.25);
}

.contents-grid a:hover {
	color: #ffff00;
	text-decoration-thickness: 3px;
	box-shadow: 0 0 10px rgba(255, 0, 0, 0.45);
}

/* Responsive */
@media (max-width: 900px) {
	.contents-grid {
	grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.contents-grid {
	grid-template-columns: 1fr;
	}
}

/* =========================
   Sub-page panel
   ========================= */

.subpage-panel {
	width: min(560px, 100%);
	margin: 16px auto;
	padding: 12px;

	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	align-items: center;

	border: 2px solid #660000;
	background-color: #220000;

	box-shadow:
	inset 0 2px 0 rgba(255, 255, 255, 0.10),
	inset 0 -2px 0 rgba(0, 0, 0, 0.65);
}

.subpage-icon {
	display: grid;
	place-items: center;
	width: 96px;
	height: 96px;
	background: #000;
	border: 1px solid #660000;
	text-decoration: none;
}

.subpage-icon img {
	width: 96px;
	height: 96px;
	object-fit: contain;
	image-rendering: auto;
	transition: filter 120ms ease;
}

.subpage-icon:hover img {
	filter:
		drop-shadow(0 0 3px rgba(255, 0, 0, 0.6))
		drop-shadow(0 0 6px rgba(255, 0, 0, 0.35));
}

.subpage-link {
	display: inline-block;
	font-family: var(--font-ui);
	font-size: 1.25rem;
	letter-spacing: 0.06em;

	color: #e9e900;
	text-decoration: none;
}

.subpage-link:hover {
	color: #ffff00;
	text-decoration: none;
	text-shadow: 0 0 10px rgba(255, 255, 0, 0.35);
}

.subpage-caption {
	margin-top: 4px;
	font-family: var(--font-heading);
	font-size: 1.0rem;
	color: #d0d0d0;
	line-height: 1.3;
}

@media (max-width: 700px) {
  .subpage-panel {
    width: 100%;
  }
}

/* =========================
   Description box
   ========================= */
   
.info-description {
	margin-top: 18px;
	padding: 14px 14px;
}

.info-description p {
	margin: 0 0 12px 0;
	font-family: var(--font-body);
	font-size: 1.0rem;
	color: #fff;
	word-spacing: -0.1em;
}

.info-description p:last-child {
	margin-bottom: 0;
}

.info-description ul li {
	padding-bottom: 8px;
}

/* =========================
   Image Gallery
   ========================= */
   
.image-gallery {
	margin-top: 18px;
	padding: 5px;
}

.image-gallery h3 {
	font-family: var(--font-heading);
	font-size: 1.4rem;
	color: #ffcc00;
	padding: 0 12px;
}

.image-gallery p {
	padding: 0 12px;
}

.image-gallery .gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	align-items: start;
}

.image-gallery figure {
	margin: 0;
}

.image-gallery a {
	display: block;
}

.image-gallery img {
	width: 100%;
	height: auto;
	max-width: 550px;
	border: 1px solid #660000;
	object-fit: contain;
	display: block;
}

.image-gallery a:hover img {
	box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

.image-gallery figcaption {
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
	padding-right: 20px;
	margin-top: 5px;  /* match the gallery padding of 5px */
}

.image-gallery figcaption.centered {
	text-align: center;
	padding-right: 0;
}


/* =========================
   Outfit Gallery
   ========================= */

.outfit-gallery {
	margin-top: 18px;
	padding: 12px;
}

.outfit-gallery h3 {
	margin: 0 0 12px 0;
	font-family: var(--font-heading);
	font-size: 1.4rem;
	color: #ffcc00;
}

.outfit-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

.outfit-grid figure {
	margin: 0;
	text-align: center;
}

.outfit-grid img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border: 1px solid #660000;
	background-color: #000;
}

.outfit-grid figcaption {
	margin-top: 6px;
	margin-bottom: 12px;
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
}


@media (max-width: 1200px) {
  .outfit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .outfit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 450px) {
  .outfit-grid {
    grid-template-columns: 1fr;
  }
}

.char-hero-caption {
	margin-top: 8px;
	margin-bottom: 4px;
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
	text-align: center;
}

/* =========================
   Minor Characters Gallery
   ========================= */

.minor-gallery {
	margin-top: 18px;
	margin-bottom: 18px;
	padding: 0 10px 0 10px;
}

.minor-gallery-grid {
	list-style: none;
	margin: 0;
	padding: 0;

	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.minor-gallery figure {
	margin: 0;
}

.minor-gallery a {
	display: block;
}

.minor-gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;

	border: 1px solid #660000;
}

.minor-gallery a:hover img {
	box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

.minor-gallery figcaption {
	margin-top: 6px;
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
	text-align: center;
}

/* =========================
   Weapon Layout
   ========================= */

.weapon-page {
	padding-top: 30px;
	padding-bottom: 30px;
}

.weapon-header {
	margin-bottom: 18px;
}

.weapon-header h1 {
	margin: 0 0 6px 0;
}

.weapon-top {
	display: grid;
	grid-template-columns: 420px 1fr; /* left fixed, right flexible */
	gap: 16px;
	margin-top: 18px;
	align-items: start;
}

.weapon-hero {
	padding: 6px;
	padding-right: 8px;
}

.weapon-hero a {
	display: block;
}

.weapon-hero a:hover img {
	box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

.weapon-hero img {
	width: 100%;
	object-fit: cover;
	display: block;
	border: 1px solid #660000;
}

.weapon-hero-caption {
	margin-top: 8px;
	font-size: 0.8rem;
	color: #aaa;
	font-family: var(--font-heading);
}

@media (max-width: 900px) {
	.weapon-top {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Game Manual Panel
   ========================= */

.game-manual {
	margin-top: 16px;
	padding: 14px 16px;
	background-color: #000;
}

.game-manual h3 {
	margin: 0 0 10px 0;
	font-family: var(--font-heading);
	font-size: 1.4rem;
	color: #ffcc00;
	
	text-shadow:
	2px 2px 0 #5a4300,
	-1px -1px 0 rgba(255,226,138,0.8);
}

.manual-entry {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 10px;
	margin-bottom: 10px;
}

.manual-label {
	font-family: var(--font-ui);
	font-size: 0.9rem;
	color: #ccc;
	letter-spacing: 0.02em;
}

.manual-value {
	font-family: var(--font-body);
	font-size: 0.95rem;
	color: #e0e0e0;
	line-height: 1.5;
}

.manual-entry:last-child {
	margin-bottom: 0;
}

@media (max-width: 900px) {
	.weapon-stats .stats-grid {
		grid-template-columns: 160px 1fr;
	}
}

@media (max-width: 600px) {
	.weapon-stats .stats-grid {
		grid-template-columns: 1fr;
	}

	.weapon-stats .stat-label {
		border-right: none;
		border-bottom: 1px solid #660000;
	}

	.image-gallery .gallery-grid {
		grid-template-columns: 1fr;
	}
}

.video-display {
	width: 100%;
	max-width: 550px;
	display: block;

	border: 1px solid #660000;
	border-bottom: 2px solid #660000;
	background-color: #000;
	margin-bottom: 4px;
}

.info-layout {
	display: grid;
	grid-template-columns: minmax(260px, 550px) 1fr;
	gap: 16px;
	align-items: start;
	padding-bottom: 12px;
}

.info-media {
	max-width: 550px;
}

.info-media img {
	display: block;
	max-width: 100%;
	height: auto;
}

.info-media a:hover img {
	box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

.info-text p {
	margin-top: 0;
	font-size: 1.0em;
}

/* =========================
   Stats Panel
   ========================= */

.panel-stats-icon {
	grid-column: 1 / -1; /* span both columns */
	text-align: center;
	padding: 12px;
	background-color: #000;
	border-top: 1px solid #660000;
	border-bottom: 1px solid #660000;
}

.panel-stats-icon img {
	max-width: 129px;
	height: auto;
	box-shadow:
	0 0 12px rgba(255, 255, 255, 0.6),
	0 0 24px rgba(255, 255, 255, 0.35);
}

.panel-stats .stats-grid {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 0;
}

.panel-stats.stats-wide .stats-grid {
  grid-template-columns: 160px 1fr;
}

.panel-stats.stats-wide .stat-value ul {
  margin: 0px;
  padding-left: 18px;
}

.panel-stats .stat-row {
	display: contents;
}

.panel-stats .stat-label,
.panel-stats .stat-value {
	padding: 10px 12px;
	border-top: 1px solid #660000;
	font-size: 0.95rem;
	min-width: 0;
    overflow-wrap: anywhere;
}

.panel-stats .stat-value ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.panel-stats .stat-label {
	font-family: var(--font-ui);
	letter-spacing: 0.02em;
	color: #fff;
	background-color: #220000;
	border-right: 1px solid #660000;
}

.panel-stats .stat-value {
	color: #e0e0e0;
	background-color: #000;
}

.panel-stats.panel-centered {
	max-width: 500px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

/* =========================
   Footer
   ========================= */

footer {
	padding-top: 0px;
	padding-bottom: 0px;
	padding-left: calc(var(--sidebar-width));
	padding-right: calc(var(--sidebar-width));
	font-family: var(--font-heading);
	font-size: 0.85rem;
	color: #aaa;
	text-align: center;
	position: relative;
	line-height: 1.6;
	background-color: #000;
}

footer::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
		
	background-image: url("images/bg-scanline.png");
	background-repeat: repeat;
	background-position: top left;

	opacity: 1.0; /* overall strength */
}

footer .footer-inner {
	border: 2px solid #660000;
	padding: 8px 12px;
	position: relative;
	z-index: 2;
}

footer p {
	margin: 5px 0;
}

footer .donate-link {
	display: inline-block;
	font-family: var(--font-ui);
	font-size: 0.8rem;
	letter-spacing: 0.05em;

	color: #ffcc00;
	text-decoration: none;

	border: 1px solid #660000;
	padding: 4px 10px;
	background-color: #220000;

	box-shadow:
	inset 0 2px 0 rgba(255, 255, 255, 0.12),
	inset 0 -2px 0 rgba(0, 0, 0, 0.7);
}

footer .donate-link:hover {
	color: #ffff00;
	box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

.site-bottom-banner {
	position: relative;
	width: 100%;
	height: 300px;
	overflow: hidden;
}

.site-bottom-banner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.site-bottom-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.9),
    rgba(0,0,0,0.0) 100%
  );
  pointer-events: none;
}

/* =========================
   Level Select
   ========================= */

.level-select {
	margin-top: 18px;
	padding: 18px 14px;
	background-color: #d1b675;
	background-image: url("images/levels/manilla-bg.png");
	background-repeat: repeat;
	background-position: top left;
	border: 2px solid #857349;
}

.level-select h1 {
	color: #000000;
	border: 1px solid #857349;
	box-shadow: 0px 0px 5px black;
	margin: 0px;
}

.level-select a,
.level-select a:hover {
	text-decoration: none;
}

/* film strip */
.film-row {
	position: relative;
	margin: 14px 0;
	padding: 18px 16px;
	background: rgba(0,0,0,0.9);
	border: 1px solid #7a6d46;
	overflow: hidden;
}

/* sprocket holes top + bottom */
.film-row::before,
.film-row::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 18px;
	pointer-events: none;
	opacity: 0.9;

	background-image: radial-gradient(circle, #c1ac82 4px, rgba(0,0,0,0) 5px);
	background-size: 22px 18px;
	background-repeat: repeat-x;
}

.film-row::before { top: 0; }
.film-row::after  { bottom: 0; }

/* the 5x5 grid */
.film-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 14px;
	align-items: start;
}

/* tile */
.level-tile {
	display: block;
	text-decoration: none;
	background: rgba(0,0,0,0.35);
	border: 1px solid rgba(255,255,255,0.3);
	padding: 7px;
	padding-right: 9px;
	border-radius: 2px;

	box-shadow:
		inset 0 3px 3px rgba(255, 255, 255, 0.12),
		inset 0 -3px 3px rgba(0, 0, 0, 1.0);
}

.level-tile img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;

	/* grayscale default */
	filter: grayscale(1) contrast(1.05) brightness(0.95);
	transition: filter 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.level-label {
	display: block;
	margin-top: 8px;
	text-align: center;
	font-family: var(--font-ui);
	font-size: 0.95rem;
	letter-spacing: 0.08em;
	color: #cfcfcf;
	text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
}

/* hover: colorize */
.level-tile:hover img {
	filter: grayscale(0) contrast(1.08) brightness(1.05);
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
	transform: translateY(-1px);
}

.level-tile:hover .level-label {
	color: #ffffff;
	font-weight: 900;
}

/* last row: only Cuba centered in the middle column */
.film-row-last {
	grid-template-columns: repeat(5, 1fr);
}

.level-tile-cuba {
	grid-column: 3; /* center column */
}

.level-tile-egyptian {
	grid-column: 2;
}

.level-tile-statue {
	grid-column: 3;
}

.level-tile-cradle {
	grid-column: 4;
}

.level-tile-training {
	grid-column: 3;
}

.level-tile-citadel {
	grid-column: 4;
}

@media (max-width: 900px) {
  .film-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .level-tile-cuba {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .film-row {
    grid-template-columns: 1fr;
  }
}

.dev-quote {
	margin: 12px 0;
	padding: 14px 18px;

	border-left: 4px solid #660000;
	background-color: rgba(88, 0, 0, 0.4);

	line-height: 1.4;

	color: #ddd;
}

.dev-quote p {
	font-family: monospace;
	font-size: 0.9rem;
	margin: 0;
}

.dev-quote cite {
	display: block;
	margin-top: 8px;
	font-family: var(--font-heading);
	font-size: 0.85rem;
	color: #aaa;
	font-style: normal;
}

.dev-quote .quote-source {
	margin-left: 6px;
	font-size: 0.8rem;
}

.dev-quote .quote-source a {
	color: #9fd3ff;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.dev-quote .quote-source a:hover {
	text-decoration-thickness: 2px;
}

.dev-quote .quote-source a::before {
	content: "↗ ";
	color: #aaaaaa;
}

/* =========================
   Button Code Presentation
   ========================= */

.code-title {
	margin: 0 0 12px 0;
	font-weight: 600;
	font-family: var(--font-ui);
	font-size: 1.2em;
	letter-spacing: 0.1em; 
}

.code-caption {
	margin: 0;
	padding-bottom: 12px;
	font-weight: 300;
	font-family: var(--font-body);
	font-size: 0.8em;
}

.code-list {
	padding: 12px;
	max-width: 300px;
}

.code-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 4px;
	border-top: 1px solid rgba(102, 0, 0, 0.6);
}

.code-row:first-child {
	border-top: none;
}

.code-panel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;

	align-items: start;
}

/* =========================
   MP Weapon Sets
   ========================= */

.mp-weapon-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	background-color: #220000;
	border: 2px solid #660000;
	padding: 12px;
	
	max-width: 500px;
	margin: 24px auto;
}

.mp-set-slot {
	font-family: var(--font-ui);
	letter-spacing: 0.1em;
	font-size: 0.85em;
	color: #ccaaaa;
	white-space: nowrap;
}

.mp-set-row {
	display: grid;
	grid-template-columns: 1.0fr 1.0fr 1.0fr;
	gap: 24px;

	align-items: center;

	padding: 8px 10px;
	margin: 0px 12px;
	font-size: 1.1rem;
	border: 1px solid #660000;
	box-shadow:
		inset 0 2px 0 rgba(255, 255, 255, 0.10),
		inset 0 -2px 0 rgba(0, 0, 0, 0.65);
		
	position: relative;
	overflow: hidden;
}

.mp-set-row::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;

	/* Interpolate from cool (blue-white) to warm (red) */
	background: color-mix(
		in srgb,
		rgba(180, 220, 255, 0.10) calc((1 - var(--rarity, 0)) * 100%),
		rgba(255, 80, 80, 0.10) calc(var(--rarity, 0) * 100%)
		);
}

.mp-set-row > * {
	position: relative;
}

.mp-set-row:hover::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: rgba(255, 0, 0, 0.08);
}
.mp-set-title {
	margin: 0 0 16px;
	padding-bottom: 6px;
	border-bottom: 1px solid #660000;

	font-weight: 800;
	font-size: 1.5em;
	letter-spacing: 0.1em;
	text-align: center;
}

.mp-set-icon {
	width: 96px;
	height: 96px;
}

/* =========================
   N64 Buttons
   ========================= */
   
.n64-btn {
	display: inline-block;
	min-width: 1.6em;
	padding: 1px 6px;

	font-family: var(--font-ui);
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.4;

	text-align: center;
	border-radius: 4px;

	border: 1px solid #555;
	background-color: #222;
	color: #ddd;

	box-shadow:
	inset 0 1px 0 rgba(255,255,255,0.15),
	inset 0 -1px 0 rgba(0,0,0,0.6);
}

.n64-btn-a {
	background-color: #1e4fff;
	border-color: #1230aa;
	color: #fff;
}

.n64-btn-b {
	background-color: #1fa33a;
	border-color: #146c27;
	color: #fff;
}

.n64-btn-c {
	background-color: #e0c200;
	border-color: #9a8700;
	color: #000;
	min-width: 2.4em;
}

.n64-btn-c-up::after {
	content: "C ▲";
}

.n64-btn-c-down::after {
	content: "C ▼";
}

.n64-btn-c-left::after {
	content: "C ◀";
}

.n64-btn-c-right::after {
	content: "C ▶";
}

.n64-btn-start {
	background-color: #c02020;
	border-color: #7a1414;
	color: #fff;
}

.n64-btn-z {
	background-color: #2a2a32;
	border-color: #555566;
	color: #ddd;
}

.n64-btn-l,
.n64-btn-r,
.n64-btn-lr {
	background-color: #2a2a2a;
	border-color: #555;
	color: #ddd;
	width: 4.2em;
	padding: 1px 0; 
	text-align: center;
	border-radius: 10px 10px 4px 4px;
}

.n64-btn-dpad {
	background-color: #2a2a2a;
	border-color: #555;
	color: #ddd;

	min-width: 2.4em;
	padding: 1px 6px;
	height: auto;

	position: static;
}

.n64-btn-dpad-up::after {
	content: " D ▲";
}

.n64-btn-dpad-down::after {
	content: " D ▼";
}

.n64-btn-dpad-left::after {
	content: " D ◀";
}

.n64-btn-dpad-right::after {
	content: " D ▶";
}

/* directions */
.n64-btn-dpad-up::before    { transform: rotate(0deg); }
.n64-btn-dpad-right::before { transform: rotate(90deg); }
.n64-btn-dpad-down::before  { transform: rotate(180deg); }
.n64-btn-dpad-left::before  { transform: rotate(270deg); }

.n64-plus {
	margin: 0 4px;
	font-family: var(--font-ui);
	font-weight: 700;
	color: #ffffff;
}

/* =========================
   Cheat Grid Table
   ========================= */

.cheat-grid {
	font-family: var(--font-ui);
	margin-top: 24px;
	padding: 14px 14px;
	background-color: #220000;
	border: 2px solid #660000;
}

.cheat-table {
	width: 100%;
	border-collapse: collapse;
	background-color: #000;
	border: 1px solid #660000;
	overflow: hidden;
}

.cheat-table th,
.cheat-table td {
	padding: 6px 12px;
	border-top: 1px solid #660000;
	font-size: 0.95rem;
	color: #e0e0e0;
	vertical-align: top;
}

/* Brighter header row */
.cheat-table thead th {
	letter-spacing: 0.06em;
	color: #fff;
	text-align: left;

	background-color: #400000;
	border-bottom: 2px solid #800000;
}

/* Body rows */
.cheat-table tbody td {
	font-family: "JetBrains Mono", monospace;
	background-color: #000;
}

/* Zebra striping (subtle) */
.cheat-table tbody tr:nth-child(even) td {
	background-color: rgba(34, 0, 0, 0.55);
}

/* Hover highlight */
.cheat-table tbody tr:hover td {
	background-color: rgba(255, 0, 0, 0.12);
}

@media (max-width: 700px) {
  .cheat-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.difficulty {

}

.difficulty.agent {
	color: #b8ffb8;
}

.difficulty.sa {
	color: #fff0b3;
}

.difficulty.ooa {
	color: #ffb3b3;
}

/* =========================
   Rainbow Cheat Text
   ========================= */

.cheat-rainbow {
	font-weight: 700;

	background: linear-gradient(
	90deg,
	#ff0000,
	#ff9900,
	#ffff00,
	#00ff00,
	#00ffff,
	#0000ff,
	#cc00ff
	);

	background-size: 100% 100%;

	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;

	text-shadow: 0 0 4px rgba(255, 255, 255, 0.25);
}

/* =========================
   Back links
   ========================= */

.back-link-wrap {
	text-align: center;
}

.back-link {
	display: inline-block;
	margin: 24px auto 24px auto;

	font-family: var(--font-ui);
	font-size: 0.9rem;
	letter-spacing: 0.06em;

	color: #ffcc00;
	text-decoration: none;

	padding: 4px 10px;
	border: 1px solid #660000;
	background-color: #220000;

	box-shadow:
	inset 0 2px 0 rgba(255, 255, 255, 0.12),
	inset 0 -2px 0 rgba(0, 0, 0, 0.7);
}

.back-link:hover {
	color: #ffff00;
	text-decoration: none;
	box-shadow:
	0 0 10px rgba(255, 0, 0, 0.6),
	inset 0 2px 0 rgba(255, 255, 255, 0.12),
	inset 0 -2px 0 rgba(0, 0, 0, 0.7);
}

.gradient-text-ge {
	background: linear-gradient(
		to bottom,
		#ff8500 0%,
		#ff0000 100%
		);

	-webkit-background-clip: text;
	background-clip: text;

	color: transparent;
  
	filter: drop-shadow(0 0 5px rgba(255, 0, 0, 1.0));
}

.gradient-text-depot {
	background: linear-gradient(
		to bottom,
		#00ddff 0%,
		#0000ff 100%
		);

	-webkit-background-clip: text;
	background-clip: text;

	color: transparent;
	
	filter: drop-shadow(0 0 5px rgba(0, 0, 255, 1.0));
}

.gradient-text-ge-small {
	background: linear-gradient(
		to bottom,
		#ff8500 0%,
		#ff0000 100%
		);

	-webkit-background-clip: text;
	background-clip: text;

	color: transparent;
	
	font-size: 1.1em;
	font-weight: 900;
}

.gradient-text-depot-small {
	background: linear-gradient(
		to bottom,
		#00ddff 0%,
		#0000ff 100%
		);

	-webkit-background-clip: text;
	background-clip: text;

	color: transparent;
	
	font-size: 1.1em;
	font-weight: 900;
}

/* =========================
   Blog
   ========================= */
   
.blog-panel {
	margin-bottom: 16px;
	position: relative;
	background: #220000;

	border: 6px double rgba(255, 0, 0, 0.35);

	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.85),
		inset 0 0 0 2px rgba(255, 255, 255, 0.18);

	padding: 0;
}

.blog-panel__header {
	padding: 10px 14px 6px 14px;
}

.blog-panel__meta {
	font-family: var(--font-body);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;

	color: #ffe26a;
}

.blog-panel__sep {
	margin: 0 6px;
	opacity: 0.7;
}

.blog-panel__title {
	opacity: 1;
}

.blog-panel__rule {
	height: 2px;
	margin: 0 14px;
	background: rgba(255, 0, 0, 0.5);

	box-shadow: 0 0 6px rgba(255, 0, 0, 0.25);
}

.blog-panel__signature {
	margin-top: 6px;
	padding: 10px 14px 14px 14px;

	text-align: right;
}

.blog-panel__sig-image {
	display: inline-block;
	width: 150px;
	height: auto;

	filter: drop-shadow(0 0 3px rgba(255, 0, 0, 0.35));
}

.blog-panel__sig-caption {
	margin-top: 4px;

	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: 0.03em;

	color: rgba(255, 226, 106, 0.85);
}

/* =========================
   Levels
   ========================= */
   

.hero-panel {
	box-sizing: border-box;

	margin: 24px auto 28px auto;
	padding: 12px;

	background: #220000;
	border: 6px double rgba(255, 0, 0, 0.35);

	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.85),
		inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.hero-panel-wrap {
	text-align: center;
}

.hero-panel__img {
	display: block;
	margin: 8px auto;

	max-width: 100%;
	height: auto;

	max-height: 70vh;

	border: 1px solid rgba(255, 255, 255, 0.20);
	box-shadow: 0 0 10px rgba(0,0,0,0.45);
}

.hero-panel a:hover img {
	box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}


.hero-panel--fit {
	display: inline-block;   /* shrink-wrap to contents */
	max-width: 1100px;
}

.hero-panel-wrap {
	text-align: center;
}

.briefing {
	margin: 18px auto 0 auto;
	max-width: 1100px;

	padding: 18px 14px;
	background-color: #d1b675;
	background-image: url("images/levels/manilla-bg.png");
	background-repeat: repeat;
	background-position: top left;
	border: 2px solid #857349;
}

.mission-part {
	padding-left: 16px;
	font-weight: 600;
	color: #000;
	font-size: 1.5em;
	line-height: 0.5;
}

.objectives {
	margin: 0;
	padding-left: 1.8em;

	font-family: var(--font-body);
	color: #000;
	font-weight: 800;
}

.objectives li {
	margin: 0 0 8px 0;
}

.briefing-page {
	position: relative;
	margin: 14px 0;
	padding: 12px 16px;

	background: rgba(227, 209, 159, 0.5);
	border: 1px solid #7a6d46;
	overflow: hidden;
}

.briefing-title {
	background: rgba(227, 209, 159, 0.5);
}

.briefing-page::before { top: 0; }
.briefing-page::after  { bottom: 0; }

.briefing-header {
	margin: 0;
	padding: 6px 10px;

	display: inline-block;

	background: #ddd;
	border: 1px solid rgba(255,255,255,0.18);
	box-shadow: 0 0 6px rgba(0,0,0,0.8);

	font-family: var(--font-heading);
	font-size: 1.15rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;

	color: #aa0000;
}

.briefing-rule {
	height: 2px;
	margin: 10px 0 12px 0;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

.briefing-body {
	font-family: var(--font-body);
	font-size: 1rem;
	color: #000;
	line-height: 1.45;
	word-spacing: -0.05em;
}

.briefing-body p {
	margin: 0 0 12px 0;
	color: #000;
}

.briefing-body p:last-child {
	margin-bottom: 0;
}

/* =========================
   GE Text Dump Panel
   ========================= */

.ge-dump {
	margin: 18px 0;
	padding: 12px;

	background-color: #0e0e0e;
	border: 1px solid #660000;
	box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

.ge-dump-hdr {
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 0, 0, 0.35);
}

.ge-dump-title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 1.15rem;
	color: #ffcc00;
	letter-spacing: 0.10em;
}

.ge-dump-sub {
	margin-top: 2px;
	font-family: var(--font-heading);
	font-size: 0.85rem;
	color: #aaa;
	letter-spacing: 0.08em;
}

.ge-dump-lines {
	margin: 0;
	padding-left: 2.5rem; /* make space for numbered list */
	color: #e6e6e6;
	line-height: 1.55;
	font-size: 0.95rem;
}

.ge-dump-lines li {
	margin: 0.15rem 0;
}

.ge-dump-lines li + li {

}

/* =========================
   Music Grid
   ========================= */
   
.ge-music-grid {
	margin: 24px auto;
	max-width: 1100px;
}

.ge-music-row {
	display: grid;
	grid-template-columns: 1.0fr 2fr 1.5fr;
	gap: 12px;

	align-items: center;

	padding: 8px 10px;
	font-size: 1.1rem;
	border: 1px solid rgba(255, 0, 0, 0.5);
}

.ge-music-row--tracks {
	font-size: 1.0rem;
	grid-template-columns: repeat(4, 1fr);
}

.ge-music-header {
	border: none;
	font-size: 1.5rem;
	font-weight: 800;
	color: #eee;
	pointer-events: none;
	grid-template-columns: repeat(4, 1fr);
}

.ge-music-level {
	font-size: 1.2rem;
	font-weight: 600;
	color: #ffcc00;
}

.ge-music-entry {
	color: #eee;
	font-size: 1.2rem;
}

.ge-music-row:hover {
	background: rgba(255, 0, 0, 0.08);
}

.ge-music-title {
	font-family: var(--font-heading);
	color: #ffcc00;
	letter-spacing: 0.08em;
}

.ge-music-composer {
	font-family: var(--font-heading);
	font-size: 1.0rem;
	color: #aaa;
	text-align: right;
}

.ge-music-player audio {
	width: 100%;
	height: 32px;
}

@media (max-width: 720px) {
	.ge-music-row {
	grid-template-columns: 1fr;
	gap: 6px;
  }

  .ge-music-composer {
	text-align: left;
	font-size: 0.85rem;
	opacity: 0.85;
  }
}

.ge-music-composer--red {
	color: #ff4444;
}

.ge-music-composer--blue {
	color: #44aaff;
}

.ge-music-composer--green {
	color: #44ff88;
}

/* --- Manual Reader (Vertical) --- */

.manual__header {
	margin: 0 auto 2rem;
	text-align: center;
}

.manual__meta {
	color: #aaa;
	font-size: 0.95rem;
}

.manual__pages {
	max-width: 920px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.manual__page {
	margin: 2.5rem 0;
}

.page {
	background: #330000;
	padding: 14px;
	border-radius: 10px;
	box-shadow:
		0 10px 30px rgba(0,0,0,0.5),
		inset 0 0 0 1px rgba(255,255,255,0.06);
	align-items: center;
}

.page__link {
	display: flex;
	justify-content: center;
}

.page__img {
	display: block;
	max-width: 100%;
	height: auto;
	max-height: 90vh;
	object-fit: contain;
	background: #000;
}

.page__caption {
	margin-top: 10px;
	font-size: 0.95rem;
	color: #aaa;
	text-align: center;
}

.timeline {
	list-style: none;
	margin: 12px 0 0 0;
	padding: 0 0 0 12px;
}

.timeline li {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 12px;
	padding: 10px 0 10px 16px;
	position: relative;
}

.timeline li::before {
	content: "";
	position: absolute;
	left: -4px;
	top: 16px;
	width: 10px;
	height: 10px;
	background: #660000;
	border-radius: 50%;
}

.timeline-date {
	font-family: var(--font-ui);
	font-size: 0.9rem;
	color: #c0c0c0;
	white-space: nowrap;
}

.timeline-event {
	color: #e0e0e0;
	line-height: 1.4;
}

.timeline-release .timeline-date {
	color: #f0c060;
	font-weight: bold;
}