/* /games/: data-page readouts, status tabs, and the recent-shutdowns strip in the grid. */

.gh {
	--gh-ash: color-mix(in oklch, var(--fg-1) 46%, var(--bg-0));
	--gh-panel: color-mix(in oklch, var(--bg-1) 70%, var(--bg-0));
	font-variant-numeric: tabular-nums;
}
.gh a:focus-visible { outline: 2px solid var(--jrpg-gold); outline-offset: 3px; }

.gh-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
	flex-wrap: wrap;
	margin: 8px 0 28px;
}

.gh-reads { display: flex; align-items: stretch; }
.gh-read {
	display: flex; align-items: center; gap: 14px;
	padding: 2px 28px;
	text-decoration: none;
	color: var(--fg-1);
}
.gh-read + .gh-read { border-left: 1px solid var(--bg-line); }
.gh-read:first-child { padding-left: 0; }
.gh-read:last-child { padding-right: 0; }
.gh-read-n { font: 600 var(--fs-2xl)/1 var(--font-mono); letter-spacing: -.02em; color: var(--fg-1); }
.gh-read-txt { display: flex; flex-direction: column; gap: 4px; }
.gh-read-label { font-size: var(--fs-meta); color: var(--fg-3); line-height: 1.2; }
.gh-read-link {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--font-headline);
	font-size: var(--fs-md);
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.1;
	color: var(--jrpg-purple-bright);
	transition: color .2s;
}
.gh-read .gh-arrow { flex: none; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.gh-read:hover .gh-read-link { color: var(--fg-1); }
.gh-read:hover .gh-arrow { transform: translateX(4px); }

.gh-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--bg-line); margin: 0 0 18px; }
.gh-tab {
	display: inline-flex; align-items: baseline; gap: 8px;
	padding: 0 0 12px;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	color: var(--fg-3);
	font-family: var(--font-headline);
	font-size: var(--fs-md);
	font-weight: 600;
	letter-spacing: .02em;
	text-decoration: none;
	transition: color .2s, border-color .2s;
}
.gh-tab:hover { color: var(--fg-1); }
.gh-tab[aria-current] { color: var(--fg-1); border-bottom-color: var(--jrpg-purple-bright); }
.gh-tab-n { font: 500 12px/1 var(--font-mono); color: var(--fg-3); }
.gh-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jrpg-success); align-self: center; }
.gh-tab-dot.is-dead { background: var(--gh-ash); }
.gh-tab-note { margin: -6px 0 18px; font-size: var(--fs-ui); color: var(--fg-3); }
.gh .gh-tab-note a { display: inline-flex; align-items: center; gap: 4px; color: var(--jrpg-purple-bright); text-decoration: none; font-weight: 500; }
.gh .gh-tab-note a:hover { color: var(--fg-1); }

/* The shared filter form, flattened on /games/: no box, square controls, genres as text links. */
.gh .bg-filter { background: none; border: 0; border-radius: 0; padding: 0; gap: 14px; margin-bottom: 28px; }
.gh .bg-filter-search { border-radius: 8px; padding: 9px 14px; }
.gh .bg-sort-trigger { border-radius: 8px; padding: 10px 12px 10px 14px; }
.gh .bg-filter-tags { gap: 6px 22px; }
.gh .bg-filter-tag {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 4px 0;
	color: var(--fg-2) !important;
	text-decoration: underline !important;
	text-decoration-color: transparent !important;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px !important;
}
.gh .bg-filter-tag:hover { background: none; color: var(--fg-1) !important; text-decoration-color: var(--jrpg-purple-bright) !important; }
.gh .bg-filter-tag-count { font-size: 12px; }
.gh .bg-filter-more > summary { border: 0; border-radius: 0; padding: 4px 0; background: none; }
.gh .bg-filter-more > summary:hover { background: none; color: var(--fg-1); }
.gh .bg-filter-more[open] > summary { background: none; color: var(--fg-1); }
.gh .bg-filter-more-pop { gap: 6px 22px; }

.gh-av {
	width: 32px; height: 32px; flex: none;
	border-radius: 8px;
	object-fit: cover;
	display: inline-grid; place-items: center;
	background: color-mix(in oklch, var(--jrpg-purple) 22%, var(--bg-2));
	color: var(--fg-2);
	font: 600 11px/1 var(--font-mono);
}

.bg-grid > .gh-strip {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(12rem, auto) minmax(0, 1fr);
	align-items: center;
	gap: 12px 32px;
	padding: 18px 22px;
	border: 1px solid var(--bg-line);
	border-radius: var(--r-card);
	background: repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in oklch, var(--gh-ash) 6%, transparent) 12px 13px), var(--gh-panel);
}
.gh-strip-head { display: flex; flex-direction: column; gap: 6px; }
.gh-strip-h {
	font-family: var(--font-headline) !important;
	font-size: var(--fs-lg) !important;
	font-weight: 600 !important;
	letter-spacing: .02em;
	line-height: 1.2 !important;
	margin: 0 !important;
	color: var(--fg-1) !important;
	text-transform: none !important;
}
.gh-strip-more { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: 500; color: var(--jrpg-purple-bright); text-decoration: none; }
.gh-strip-more svg { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.gh-strip-more:hover { color: var(--fg-1); }
.gh-strip-more:hover svg { transform: translateX(3px); }
.gh-strip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gh-strip-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gh-strip-item .gh-av { filter: grayscale(1); opacity: .75; }
.gh-strip-who { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.gh-strip-name, .gh-strip-name a { color: var(--fg-2); font-weight: 600; font-size: var(--fs-ui); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-strip-name a:hover { color: var(--fg-1); }
.gh-strip-meta { font: 500 12px/1.3 var(--font-mono); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-pct.is-down { color: var(--jrpg-danger); }
.gh-pct.is-up { color: var(--jrpg-success); }

@media (max-width: 960px) {
	.bg-grid > .gh-strip { grid-template-columns: 1fr; }
	.gh-strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.gh-head { flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 22px; }
	.gh-reads { flex-direction: column; border-top: 1px solid var(--bg-line); }
	.gh-read { padding: 14px 0; border-bottom: 1px solid var(--bg-line); }
	.gh-read + .gh-read { border-left: 0; }
	.gh-read-n { min-width: 4.2ch; font-size: var(--fs-xl); }
	.gh-tabs { gap: 18px; }
	.gh-tab { font-size: var(--fs-ui); white-space: nowrap; gap: 6px; }
	.gh .bg-filter-tags { gap: 4px 18px; }
	.gh-strip-list { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.gh-read .gh-arrow, .gh-strip-more svg { transition: none; }
	.gh-read:hover .gh-arrow { transform: none; }
}
