/* The Last Screening — scoped to .fgfg-game.
   Selectors are doubled (.fgfg-game.fgfg-game) and text colours set on every element,
   so a theme's own styles for headings, lists and form fields can't bleed in. */

.fgfg-game.fgfg-game {
	--fgfg-bg: #0f0e0d;
	--fgfg-panel: #1b1916;
	--fgfg-line: #3b352d;
	--fgfg-text: #ece5d3;
	--fgfg-muted: #a89f8c;
	--fgfg-gold: #d6b25e;
	--fgfg-gold-ink: #17130a;
	--fgfg-paper: #efe6cf;
	--fgfg-paper-ink: #1d1a14;
	--fgfg-red: #b23a2e;
	--fgfg-deco: 'Limelight', 'Didot', 'Bodoni 72', Georgia, serif;
	--fgfg-serif: 'Cormorant Garamond', 'Garamond', 'Baskerville', Georgia, serif;
	--fgfg-type: 'Special Elite', 'Courier Prime', 'Courier New', Courier, monospace;
	max-width: 660px;
	margin: 1.5em auto;
	font-family: var(--fgfg-serif);
	font-size: 18px;
	line-height: 1.45;
	color: var(--fgfg-text);
	text-align: left;
}
.fgfg-game.fgfg-game *,
.fgfg-game.fgfg-game *::before,
.fgfg-game.fgfg-game *::after { box-sizing: border-box; }

/* Every text element gets its colour from the game, never the theme. */
.fgfg-game.fgfg-game p,
.fgfg-game.fgfg-game li,
.fgfg-game.fgfg-game span,
.fgfg-game.fgfg-game div,
.fgfg-game.fgfg-game h2,
.fgfg-game.fgfg-game h3 {
	color: var(--fgfg-text);
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	box-shadow: none;
	text-shadow: none;
}
.fgfg-game.fgfg-game ul { list-style: none; margin: 0; padding: 0; }
.fgfg-game.fgfg-game li::before, .fgfg-game.fgfg-game li::marker { content: none; }

/* ---------- the card ---------- */
.fgfg-game.fgfg-game .fgfg-card {
	position: relative;
	overflow: hidden;
	background: radial-gradient(ellipse at 50% 0%, #26221c 0%, var(--fgfg-bg) 70%);
	border: 1px solid var(--fgfg-line);
	border-radius: 6px;
	padding: 26px 26px 24px;
	box-shadow: 0 0 0 4px var(--fgfg-bg), 0 0 0 5px var(--fgfg-gold), 0 14px 34px rgba(0, 0, 0, 0.35);
	animation: fgfg-flicker 6s infinite steps(1);
}
.fgfg-game.fgfg-game .fgfg-card > * { position: relative; z-index: 1; }
.fgfg-game.fgfg-game .fgfg-grain {
	position: absolute; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.09;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	animation: fgfg-grain 0.6s infinite steps(4);
}
@keyframes fgfg-grain {
	0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); }
	50% { transform: translate(3%, -2%); } 75% { transform: translate(-2%, -4%); } 100% { transform: translate(0, 0); }
}
@keyframes fgfg-flicker {
	0%, 100% { filter: brightness(1); } 31% { filter: brightness(0.94); } 32% { filter: brightness(1); }
	67% { filter: brightness(0.97); } 68% { filter: brightness(1); }
}
.fgfg-game.fgfg-game .fgfg-loading { color: var(--fgfg-muted); text-align: center; font-family: var(--fgfg-type); }

.fgfg-game.fgfg-game .fgfg-header {
	display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
	border-bottom: 1px solid var(--fgfg-line); padding-bottom: 10px; margin-bottom: 18px;
}
.fgfg-game.fgfg-game .fgfg-title { font-family: var(--fgfg-deco); color: var(--fgfg-gold); font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; }
.fgfg-game.fgfg-game .fgfg-date { font-family: var(--fgfg-type); color: var(--fgfg-muted); font-size: 13px; }

/* ---------- intro ---------- */
.fgfg-game.fgfg-game .fgfg-titlecard {
	text-align: center; padding: 22px 14px; margin-bottom: 18px;
	border: 2px solid var(--fgfg-gold); outline: 1px solid var(--fgfg-gold); outline-offset: 5px;
}
.fgfg-game.fgfg-game .fgfg-titlecard-kicker { font-family: var(--fgfg-type); color: var(--fgfg-muted); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 6px; }
.fgfg-game.fgfg-game .fgfg-titlecard-title { font-family: var(--fgfg-deco); color: var(--fgfg-text); font-size: 40px; line-height: 1.05; font-weight: 400; letter-spacing: 0.03em; }
.fgfg-game.fgfg-game .fgfg-story { font-size: 20px; margin-bottom: 10px; }
.fgfg-game.fgfg-game .fgfg-rules { margin: 14px 0 18px; }
.fgfg-game.fgfg-game .fgfg-rules li { color: var(--fgfg-muted); padding-left: 1.1em; position: relative; margin: 4px 0; font-size: 17px; }
.fgfg-game.fgfg-game .fgfg-rules li::before { content: '\2014'; position: absolute; left: 0; color: var(--fgfg-gold); }
.fgfg-game.fgfg-game .fgfg-subhead { font-family: var(--fgfg-type); color: var(--fgfg-gold); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 8px; font-weight: 400; }
.fgfg-game.fgfg-game .fgfg-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin-bottom: 22px; }
.fgfg-game.fgfg-game .fgfg-legend li { display: flex; align-items: center; gap: 8px; background: var(--fgfg-panel); border: 1px solid var(--fgfg-line); padding: 6px 10px; font-family: var(--fgfg-type); font-size: 14px; }
.fgfg-game.fgfg-game .fgfg-tier-label { flex: 1; }
.fgfg-game.fgfg-game .fgfg-tier-points { color: var(--fgfg-muted); font-variant-numeric: tabular-nums; }
.fgfg-game.fgfg-game .fgfg-emoji { width: 1.5em; text-align: center; }

/* ---------- buttons ---------- */
.fgfg-game.fgfg-game .fgfg-button {
	display: block; width: 100%; margin: 0; border: 0; border-radius: 3px; padding: 14px 18px; cursor: pointer;
	font-family: var(--fgfg-deco); font-size: 19px; letter-spacing: 0.06em; font-weight: 400; text-transform: none;
	line-height: 1.2; text-shadow: none; box-shadow: none;
}
.fgfg-game.fgfg-game .fgfg-primary { background: var(--fgfg-gold); color: var(--fgfg-gold-ink); }
.fgfg-game.fgfg-game .fgfg-primary:hover,
.fgfg-game.fgfg-game .fgfg-primary:focus-visible { background: #e4c26f; color: var(--fgfg-gold-ink); }
.fgfg-game.fgfg-game .fgfg-button:focus-visible { outline: 3px solid var(--fgfg-text); outline-offset: 3px; }
.fgfg-game.fgfg-game .fgfg-button[disabled] { opacity: 0.6; cursor: default; }

/* ---------- question ---------- */
.fgfg-game.fgfg-game .fgfg-progress { display: flex; justify-content: space-between; margin-bottom: 12px; }
.fgfg-game.fgfg-game .fgfg-interview { font-family: var(--fgfg-type); color: var(--fgfg-muted); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.fgfg-game.fgfg-game .fgfg-running { font-family: var(--fgfg-type); color: var(--fgfg-gold); font-size: 14px; }
.fgfg-game.fgfg-game .fgfg-witness { font-style: italic; color: var(--fgfg-muted); font-size: 19px; margin-bottom: 8px; border-left: 2px solid var(--fgfg-gold); padding-left: 12px; }
.fgfg-game.fgfg-game .fgfg-prompt { font-family: var(--fgfg-serif); color: var(--fgfg-text); font-size: 30px; line-height: 1.15; font-weight: 700; margin: 0 0 16px; }
.fgfg-game.fgfg-game .fgfg-prompt-small { font-size: 20px; color: var(--fgfg-muted); font-weight: 500; }

.fgfg-game.fgfg-game .fgfg-timer { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fgfg-game.fgfg-game .fgfg-timer-track { flex: 1; height: 6px; background: var(--fgfg-panel); border: 1px solid var(--fgfg-line); overflow: hidden; }
.fgfg-game.fgfg-game .fgfg-timer-bar { height: 100%; width: 100%; background: var(--fgfg-gold); transition: width 0.1s linear; }
.fgfg-game.fgfg-game .fgfg-timer-bar.fgfg-hurry { background: var(--fgfg-red); }
.fgfg-game.fgfg-game .fgfg-timer-count { width: 2.2em; text-align: right; font-family: var(--fgfg-type); color: var(--fgfg-text); font-variant-numeric: tabular-nums; }

.fgfg-game.fgfg-game .fgfg-form { display: grid; gap: 12px; }
/* The answer box: a typed line on a case card. Locked so no theme can recolour it. */
.fgfg-game.fgfg-game .fgfg-casecard {
	background: var(--fgfg-paper); padding: 10px 14px 12px; border-radius: 2px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 2px 0 rgba(0, 0, 0, 0.4);
	background-image: repeating-linear-gradient(transparent 0 33px, rgba(120, 140, 170, 0.35) 33px 34px);
}
.fgfg-game.fgfg-game .fgfg-casecard-label { display: block; font-family: var(--fgfg-type); color: #7a6e58; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.fgfg-game.fgfg-game input.fgfg-input,
.fgfg-game.fgfg-game input.fgfg-input[type="text"] {
	display: block; width: 100%; margin: 2px 0 0; padding: 4px 0; height: auto; min-height: 0;
	border: 0 !important; border-radius: 0; outline: none; box-shadow: none !important;
	background: transparent !important;
	color: var(--fgfg-paper-ink) !important;
	-webkit-text-fill-color: var(--fgfg-paper-ink) !important;
	caret-color: var(--fgfg-red);
	font-family: var(--fgfg-type) !important; font-size: 22px !important; line-height: 1.3; letter-spacing: 0.02em;
	opacity: 1;
}
.fgfg-game.fgfg-game input.fgfg-input::placeholder { color: #9c8f76 !important; -webkit-text-fill-color: #9c8f76 !important; opacity: 1; }
.fgfg-game.fgfg-game input.fgfg-input:disabled { color: #4a4436 !important; -webkit-text-fill-color: #4a4436 !important; }
.fgfg-game.fgfg-game .fgfg-casecard:focus-within { box-shadow: 0 0 0 3px var(--fgfg-gold), 0 2px 0 rgba(0, 0, 0, 0.4); }
.fgfg-game.fgfg-game .fgfg-error { color: #f0a090; margin-top: 10px; min-height: 1em; font-family: var(--fgfg-type); font-size: 15px; }

/* ---------- reveal ---------- */
.fgfg-game.fgfg-game .fgfg-verdict { text-align: center; background: var(--fgfg-panel); border: 1px solid var(--fgfg-line); padding: 18px; margin-bottom: 18px; }
.fgfg-game.fgfg-game .fgfg-verdict-emoji { font-size: 38px; line-height: 1; }
.fgfg-game.fgfg-game .fgfg-verdict-tier { font-family: var(--fgfg-deco); font-size: 28px; margin-top: 6px; letter-spacing: 0.03em; }
.fgfg-game.fgfg-game .fgfg-verdict-points { font-family: var(--fgfg-type); color: var(--fgfg-gold); font-size: 18px; margin-top: 2px; }
.fgfg-game.fgfg-game .fgfg-verdict-answer { margin-top: 6px; font-size: 20px; }
.fgfg-game.fgfg-game .fgfg-verdict-share { color: var(--fgfg-muted); font-size: 15px; margin-top: 4px; font-style: italic; }
.fgfg-game.fgfg-game .fgfg-verdict.fgfg-tier-keyevidence,
.fgfg-game.fgfg-game .fgfg-verdict.fgfg-tier-missingreel { border: 2px solid var(--fgfg-gold); }
.fgfg-game.fgfg-game .fgfg-verdict.fgfg-tier-missingreel .fgfg-verdict-tier { color: var(--fgfg-gold); }
.fgfg-game.fgfg-game .fgfg-verdict.fgfg-miss .fgfg-verdict-points { color: #e07a6a; }

.fgfg-game.fgfg-game .fgfg-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.fgfg-game.fgfg-game .fgfg-lists li { padding: 4px 0; border-bottom: 1px dashed var(--fgfg-line); font-size: 17px; }

/* ---------- results ---------- */
.fgfg-game.fgfg-game .fgfg-stamp {
	display: block; width: max-content; margin: 2px auto 10px; padding: 6px 16px;
	font-family: var(--fgfg-type); font-size: 26px; letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--fgfg-red); border: 3px double var(--fgfg-red); transform: rotate(-4deg); opacity: 0.9;
	animation: fgfg-stamp 0.35s ease-out both;
}
@keyframes fgfg-stamp { from { transform: rotate(-4deg) scale(1.6); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 0.9; } }
.fgfg-game.fgfg-game .fgfg-final { text-align: center; margin-bottom: 14px; }
.fgfg-game.fgfg-game .fgfg-final-score { font-family: var(--fgfg-deco); font-size: 64px; color: var(--fgfg-gold); line-height: 1.05; font-variant-numeric: tabular-nums; }
.fgfg-game.fgfg-game .fgfg-final-max { color: var(--fgfg-muted); font-family: var(--fgfg-type); font-size: 14px; }
.fgfg-game.fgfg-game .fgfg-rank { font-family: var(--fgfg-deco); font-size: 24px; margin-top: 6px; letter-spacing: 0.04em; }
.fgfg-game.fgfg-game .fgfg-casefile-verdict { background: var(--fgfg-paper); padding: 14px 16px; margin-bottom: 18px; border-radius: 2px; }
.fgfg-game.fgfg-game .fgfg-casefile-verdict .fgfg-subhead { color: #8a3a2e; }
.fgfg-game.fgfg-game .fgfg-casefile-verdict p { color: var(--fgfg-paper-ink); font-family: var(--fgfg-type); font-size: 17px; line-height: 1.5; }

.fgfg-game.fgfg-game .fgfg-summary { margin: 0 0 16px; }
.fgfg-game.fgfg-game .fgfg-summary-row { display: grid; grid-template-columns: 1.7em 1fr auto 2.6em; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--fgfg-line); font-size: 16px; }
.fgfg-game.fgfg-game .fgfg-summary-prompt { color: var(--fgfg-muted); }
.fgfg-game.fgfg-game .fgfg-summary-answer { text-align: right; }
.fgfg-game.fgfg-game .fgfg-summary-points { text-align: right; font-family: var(--fgfg-type); font-variant-numeric: tabular-nums; }
.fgfg-game.fgfg-game .fgfg-compare { text-align: center; color: var(--fgfg-muted); font-size: 15px; margin-bottom: 14px; font-style: italic; }
.fgfg-game.fgfg-game .fgfg-share-note { text-align: center; color: var(--fgfg-muted); font-size: 15px; white-space: pre-line; margin-top: 8px; }
.fgfg-game.fgfg-game .fgfg-tomorrow { text-align: center; color: var(--fgfg-muted); font-size: 15px; font-style: italic; margin-top: 10px; }

@media (max-width: 540px) {
	.fgfg-game.fgfg-game { font-size: 17px; }
	.fgfg-game.fgfg-game .fgfg-card { padding: 20px 16px; }
	.fgfg-game.fgfg-game .fgfg-titlecard-title { font-size: 32px; }
	.fgfg-game.fgfg-game .fgfg-prompt { font-size: 25px; }
	.fgfg-game.fgfg-game .fgfg-lists { grid-template-columns: 1fr; }
	.fgfg-game.fgfg-game .fgfg-summary-row { grid-template-columns: 1.7em 1fr 2.6em; }
	.fgfg-game.fgfg-game .fgfg-summary-answer { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
	.fgfg-game.fgfg-game .fgfg-card,
	.fgfg-game.fgfg-game .fgfg-grain,
	.fgfg-game.fgfg-game .fgfg-stamp { animation: none; }
	.fgfg-game.fgfg-game .fgfg-timer-bar { transition: none; }
}

/* Result text and copy/share buttons */
.fgfg-game.fgfg-game textarea.fgfg-result-text {
	display: block; width: 100%; margin: 0 0 12px; padding: 10px 12px; resize: none; height: auto;
	background: var(--fgfg-paper) !important; color: var(--fgfg-paper-ink) !important; -webkit-text-fill-color: var(--fgfg-paper-ink) !important;
	border: 0 !important; border-radius: 2px; box-shadow: none !important;
	font-family: var(--fgfg-type) !important; font-size: 15px !important; line-height: 1.5;
}
.fgfg-game.fgfg-game .fgfg-share-buttons { display: grid; grid-template-columns: 1fr; gap: 8px; }
.fgfg-game.fgfg-game .fgfg-share-buttons:has(> :nth-child(2)) { grid-template-columns: 2fr 1fr; }
.fgfg-game.fgfg-game .fgfg-secondary { background: transparent; color: var(--fgfg-gold); border: 1px solid var(--fgfg-gold); }
.fgfg-game.fgfg-game .fgfg-secondary:hover,
.fgfg-game.fgfg-game .fgfg-secondary:focus-visible { background: rgba(214, 178, 94, 0.12); color: var(--fgfg-gold); }

/* TMDB credit, shown under the game */
p.fgfg-credit { max-width: 660px; margin: 10px auto 0; font-size: 12px; line-height: 1.4; color: #777; text-align: center; }
p.fgfg-credit a { color: inherit; text-decoration: underline; }
