/* ============================================================
   GIVERIOPEDIA — base.css
   Reset, typography, app-shell, header, sidebar, responsive drawer.
   Design tokens come from theme.json (--wp--preset--* / --wp--custom--*);
   the aliases below keep component CSS readable and close to the prototype.
   ============================================================ */

:root {
	--gp-bg:           var(--wp--preset--color--bg);
	--gp-bg-2:         var(--wp--preset--color--bg-elevated);
	--gp-surf:         var(--wp--preset--color--surface);
	--gp-surf-2:       var(--wp--preset--color--surface-2);
	--gp-gold:         var(--wp--preset--color--gold);
	--gp-gold-bright:  var(--wp--preset--color--gold-bright);
	--gp-ink:          var(--wp--preset--color--ink);
	--gp-ink-2:        var(--wp--preset--color--ink-muted);
	--gp-ink-3:        var(--wp--preset--color--ink-faint);
	--gp-danger:       var(--wp--preset--color--danger);
	--gp-good:         var(--wp--preset--color--success);

	--gp-line:         var(--wp--custom--line);
	--gp-line-soft:    var(--wp--custom--line-soft);
	--gp-line-strong:  var(--wp--custom--line-strong);

	--gp-r:            var(--wp--custom--radius--sm);
	--gp-r-2:          var(--wp--custom--radius--lg);
	--gp-r-pill:       var(--wp--custom--radius--pill);

	--gp-sidebar-w:    var(--wp--custom--sidebar-width);
	--gp-header-h:     var(--wp--custom--header-height);

	/* WP admin bar height when logged in (set on body.admin-bar below).
	   Every fixed/100dvh element offsets by this. */
	--gp-admin-bar:    0px;

	--gp-font:         var(--wp--preset--font-family--inter);
	--gp-font-serif:   var(--wp--preset--font-family--cormorant);
	--gp-font-mono:    var(--wp--preset--font-family--jetbrains-mono);

	--gp-breakpoint:   900px;
}

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

html { -webkit-text-size-adjust: 100%; }

/* WP injects html { margin-top: 32px/46px } for the admin bar; mirror its
   breakpoint so the app shell and fixed overlays shrink/offset to match. */
body.admin-bar { --gp-admin-bar: 32px; }
@media (max-width: 782px) {
	body.admin-bar { --gp-admin-bar: 46px; }
}

body.gp-app {
	margin: 0;
	height: calc(100dvh - var(--gp-admin-bar));
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: var(--gp-font), system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gp-ink);
	background: var(--wp--custom--shell-bg);
}

.gp-app img { max-width: 100%; height: auto; display: block; }

.gp-app button,
.gp-app input,
.gp-app select,
.gp-app textarea { font: inherit; color: inherit; }

.gp-app button { background: none; border: 0; cursor: pointer; }

.gp-app a { color: var(--gp-gold); text-decoration: none; }
.gp-app a:hover { color: var(--gp-gold-bright); }

/* ---------- Typography ---------- */
.gp-app h1,
.gp-app h2,
.gp-app h3,
.gp-app h4 {
	font-family: var(--gp-font-serif), Georgia, serif;
	font-weight: 500;
	letter-spacing: 0.005em;
	color: var(--gp-ink);
	margin: 0 0 0.5em;
}
.gp-app h1 { font-size: 44px; line-height: 1.05; }
.gp-app h2 { font-size: 28px; line-height: 1.15; }
.gp-app h3 { font-size: 19px; line-height: 1.25; }
.gp-app h4 { font-size: 15px;  line-height: 1.3; }
.gp-app p  { margin: 0 0 1em; }
.gp-app code,
.gp-app pre { font-family: var(--gp-font-mono), monospace; }

/* ---------- Accessibility helpers ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.gp-skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 10px 16px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line-strong);
	border-radius: var(--gp-r);
	color: var(--gp-ink);
}

/* ============================================================
   HEADER
   ============================================================ */
.gp-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--gp-header-h);
	padding: 0 22px 0 24px;
	border-bottom: 1px solid var(--gp-line);
	background: linear-gradient(180deg, rgba(214, 178, 114, 0.04), transparent);
	flex-shrink: 0;
	gap: 16px;
}

.gp-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	width: calc(var(--gp-sidebar-w) - 24px);
	flex-shrink: 0;
	color: var(--gp-gold);
}
.gp-brand:hover { color: var(--gp-gold); }
.gp-brand-mark {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--gp-gold);
}
.gp-brand-mark img,
.gp-brand-mark svg {
	width: 30px;
	height: 30px;
	max-width: 30px;
	max-height: 30px;
	object-fit: contain;
	display: block;
}
.gp-brand-text { min-width: 0; line-height: 1.1; }
.gp-brand-t {
	display: block;
	font-family: var(--gp-font-serif), serif;
	font-size: 22px;
	letter-spacing: 0.01em;
	color: var(--gp-gold);
	white-space: nowrap;
}
.gp-brand-s {
	display: block;
	font-family: var(--gp-font-mono), monospace;
	font-size: 9.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gp-ink-3);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Search trigger */
.gp-search { flex: 1; max-width: 720px; position: relative; }
.gp-search-input {
	width: 100%;
	height: 38px;
	padding: 0 14px 0 40px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	font-size: 13.5px;
	color: var(--gp-ink);
	cursor: pointer;
}
.gp-search-input::placeholder { color: var(--gp-ink-3); }
.gp-search-input:focus { outline: 0; border-color: var(--gp-line-strong); }
.gp-search-icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gp-ink-3);
	pointer-events: none;
	display: inline-flex;
}
.gp-search-kbd {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	padding: 2px 6px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 10px;
	color: var(--gp-ink-3);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--gp-line);
	border-radius: 3px;
	pointer-events: none;
}

.gp-h-r { display: flex; gap: 10px; align-items: center; }

/* Segmented toggles (server / language) */
.gp-seg {
	display: inline-flex;
	align-items: center;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	padding: 2px;
	gap: 1px;
	height: 38px;
}
.gp-seg-l {
	font-size: 10.5px;
	color: var(--gp-ink-3);
	padding: 0 8px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.gp-seg-b {
	padding: 5px 11px;
	font-size: 11.5px;
	letter-spacing: 0.06em;
	color: var(--gp-ink-3);
	border-radius: 3px;
	text-transform: uppercase;
	font-weight: 500;
	transition: color 100ms;
}
.gp-seg-b:hover { color: var(--gp-ink); }
.gp-seg-b.is-on { background: rgba(214, 178, 114, 0.16); color: var(--gp-gold); }

/* Mobile nav toggle (hamburger) */
.gp-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 38px;
	height: 38px;
	padding: 0 9px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
}
.gp-nav-toggle span {
	display: block;
	height: 1.5px;
	background: var(--gp-ink-2);
	transition: transform 160ms, opacity 160ms;
}

/* ============================================================
   BODY LAYOUT
   ============================================================ */
.gp-body {
	flex: 1;
	display: grid;
	grid-template-columns: 0px var(--gp-sidebar-w) 1fr;
	min-height: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.gp-side {
	border-right: 1px solid var(--gp-line);
	background: rgba(7, 7, 9, 0.4);
	overflow-y: auto;
	padding: 16px 0 32px;
}
.gp-side::-webkit-scrollbar { width: 6px; }
.gp-side::-webkit-scrollbar-thumb { background: rgba(214, 178, 114, 0.10); border-radius: 6px; }
.gp-side::-webkit-scrollbar-track { background: transparent; }

.gp-side-empty {
	padding: 16px;
	font-size: 12px;
	color: var(--gp-ink-3);
	line-height: 1.5;
}

.gp-side-section { border-bottom: 1px solid var(--gp-line); }
.gp-side-section:last-child { border-bottom: 0; }

/* Menu icons: single-color SVG masks (game-icons.net), inherit currentColor */
.gp-side-ico {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: var(--gp-ico) center / contain no-repeat;
	mask: var(--gp-ico) center / contain no-repeat;
	opacity: 0.85;
}
.gp-side-ico--emoji {
	background: none;
	-webkit-mask: none;
	mask: none;
	font-size: 16px;
	line-height: 1;
	width: auto;
	opacity: 1;
}
.gp-side-sub .gp-side-ico { width: 16px; height: 16px; }
.gp-side-sub .gp-side-ico--emoji { font-size: 14px; width: auto; }

/* Section head: a link (or full-width toggle button) */
.gp-side-headrow { display: flex; align-items: stretch; }
.gp-side-headrow .gp-side-head { flex: 1; }

.gp-side-head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	text-align: left;
	color: var(--gp-ink-2);
	transition: color 120ms, background 120ms;
}
.gp-side-head:hover { color: var(--gp-ink); background: rgba(214, 178, 114, 0.04); }
.gp-side-head.is-active { background: rgba(214, 178, 114, 0.10); color: var(--gp-gold); }
.gp-side-section.is-open > .gp-side-head,
.gp-side-section.is-open > .gp-side-headrow .gp-side-head { color: var(--gp-gold); }

.gp-side-label {
	font-family: var(--gp-font-serif), serif;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: 0.02em;
	flex: 1;
}

/* Expand toggle (live-site "dropdown-toggle" equivalent) */
.gp-side-toggle {
	width: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gp-ink-3);
	flex-shrink: 0;
}
.gp-side-toggle:hover { color: var(--gp-gold); }

.gp-side-chev {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--gp-ink-3);
	transition: transform 160ms, color 160ms;
}
.gp-side-section.is-open > .gp-side-head .gp-side-chev,
.gp-side-section.is-open > .gp-side-headrow .gp-side-chev,
.gp-side-grouprow.is-open .gp-side-chev {
	transform: rotate(90deg);
	color: var(--gp-gold);
}

/* Nested children — hidden until the section is open */
.gp-side-sub {
	display: none;
	padding: 4px 0 8px;
	background: rgba(0, 0, 0, 0.18);
}
.gp-side-section.is-open .gp-side-sub { display: block; }

/* Clickable, collapsible group row */
.gp-side-grouprow {
	display: flex;
	align-items: stretch;
}
.gp-side-group {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px 8px 24px;
	font-size: 16px;
	color: var(--gp-ink-3);
	transition: color 120ms, background 120ms;
}
a.gp-side-group:hover { color: var(--gp-ink); background: rgba(214, 178, 114, 0.04); }
.gp-side-grouprow.is-open .gp-side-group { color: var(--gp-gold); }

/* Third level: hidden until its group row is open */
.gp-side-section .gp-side-sub--nested {
	display: none;
	padding: 0 0 4px;
	background: transparent;
}
.gp-side-grouprow.is-open + .gp-side-sub--nested { display: block; }

.gp-side-leaf {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px 8px 24px;
	font-size: 16px;
	color: var(--gp-ink-2);
	text-align: left;
	border-left: 2px solid transparent;
}
.gp-side-sub--nested .gp-side-leaf { padding-left: 32px; }
.gp-side-leaf:hover { color: var(--gp-ink); background: rgba(214, 178, 114, 0.04); }
.gp-side-leaf.is-active {
	color: var(--gp-gold);
	background: rgba(214, 178, 114, 0.10);
	border-left-color: var(--gp-gold);
}
.gp-side-leaf-label { line-height: 1.3; }

/* ---------- Desktop collapse (slide the sidebar away) ---------- */
.gp-side-collapse {
	display: none;
	box-sizing: border-box;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	margin: 0;
	line-height: 1;
	white-space: nowrap;
	background: transparent;
	color: var(--gp-ink-3);
	font-family: var(--gp-font-mono), monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 120ms, border-color 120ms, background 120ms;
}
.gp-side-collapse:hover { color: var(--gp-gold); }
.gp-side-collapse-ico { display: inline-block; font-size: 13px; }

/* Row pinned at the top of the sidebar */
.gp-side-collapse--hide {
	width: 100%;
	padding: 10px 16px;
	margin-top: -16px;
	border-bottom: 1px solid var(--gp-line);
	text-align: left;
}

/* Docked rail at the left edge of the layout, only when collapsed */
.gp-side-collapse--show {
	flex-direction: column;
	justify-content: flex-start;
	padding: 16px 0;
	overflow: hidden;
	border-right: 1px solid var(--gp-line);
	background: rgba(7, 7, 9, 0.4);
}
.gp-side-collapse--show .gp-side-collapse-txt {
	writing-mode: vertical-rl;
	letter-spacing: 0.14em;
}
.gp-side-collapse--show:hover { background: rgba(214, 178, 114, 0.05); }

@media (min-width: 901px) {
	.gp-side-collapse--hide { display: flex; }

	/* Explicit placement: the rail is display:none by default, which would
	   otherwise shift the sidebar into the 0px rail track. */
	.gp-side-collapse--show { grid-column: 1; grid-row: 1; }
	.gp-body > .gp-side { grid-column: 2; grid-row: 1; }
	.gp-body > .gp-main { grid-column: 3; grid-row: 1; }

	/* Static-width slide: the sidebar never changes width — it translates
	   out while its grid column closes, so text never reflows. */
	.gp-body { transition: grid-template-columns 240ms ease; }
	.gp-side {
		width: var(--gp-sidebar-w);
		min-width: var(--gp-sidebar-w);
		transition: transform 240ms ease;
	}
	body.is-side-collapsed .gp-body { grid-template-columns: 36px 0px 1fr; }
	body.is-side-collapsed .gp-side-collapse--show { display: flex; }
	body.is-side-collapsed .gp-side {
		transform: translateX(-100%);
		border-right: 0;
		visibility: hidden;
		transition: transform 240ms ease, visibility 0s 240ms;
	}
}

/* ============================================================
   MAIN
   ============================================================ */
.gp-main {
	overflow-y: auto;
	min-width: 0;
}
.gp-main::-webkit-scrollbar { width: 10px; }
.gp-main::-webkit-scrollbar-thumb { background: rgba(214, 178, 114, 0.15); border-radius: 10px; }
.gp-main::-webkit-scrollbar-track { background: transparent; }

.gp-main-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 36px 44px 80px;
}

/* ---------- Generic content scaffolding ---------- */
.gp-page-head {
	padding-bottom: 22px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--gp-line);
}
.gp-page-title { font-size: 44px; line-height: 1.05; margin: 0; }

.gp-content > * + * { margin-top: 1em; }
.gp-content a { text-decoration: underline; text-underline-offset: 2px; }
.gp-content ul,
.gp-content ol { padding-left: 1.4em; }
.gp-content blockquote {
	margin: 1.5em 0;
	padding: 12px 20px;
	border-left: 3px solid var(--gp-gold);
	background: rgba(214, 178, 114, 0.05);
	color: var(--gp-ink-2);
}
.gp-content hr { border: 0; border-top: 1px solid var(--gp-line); margin: 2em 0; }

.gp-post-list { display: flex; flex-direction: column; gap: 24px; }
.gp-post { padding-bottom: 24px; border-bottom: 1px solid var(--gp-line); }
.gp-post-title { font-size: 24px; margin: 0 0 8px; }
.gp-post-excerpt { color: var(--gp-ink-2); }

.gp-pagination { margin-top: 36px; }
.gp-pagination .page-numbers {
	display: inline-block;
	padding: 6px 11px;
	margin-right: 4px;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	color: var(--gp-ink-2);
}
.gp-pagination .page-numbers.current {
	background: rgba(214, 178, 114, 0.16);
	color: var(--gp-gold);
	border-color: var(--gp-line-strong);
}

.gp-empty { padding: 48px 0; color: var(--gp-ink-2); }

/* ---------- Section scaffolding (home, single views) ---------- */
.gp-section { margin-bottom: 48px; }
.gp-section-h {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--gp-line);
}
.gp-section-h h2 { font-size: 26px; margin: 0; }
.gp-section-meta {
	font-family: var(--gp-font-mono), monospace;
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gp-ink-3);
}

/* Nav overlay (mobile drawer scrim) */
.gp-nav-overlay {
	position: fixed;
	inset: calc(var(--gp-header-h) + var(--gp-admin-bar)) 0 0 0;
	background: rgba(6, 7, 9, 0.6);
	z-index: 50;
	opacity: 0;
	transition: opacity 200ms;
}
body.is-nav-open .gp-nav-overlay {
	display: block !important;
}

/* ============================================================
   RESPONSIVE — off-canvas sidebar drawer below the breakpoint
   ============================================================ */
/* ---------- Content sections (h2 on content pages) ---------- */
.gp-content > h2 {
	margin-top: 56px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--gp-line);
	font-size: 26px;
}
.gp-content > h2::before {
	content: "";
	display: block;
	width: 34px;
	height: 2px;
	margin-bottom: 14px;
	background: var(--gp-gold);
	opacity: 0.85;
	border-radius: 2px;
}

/* ---------- Content tables (wp-block-table) ---------- */
.gp-content .wp-block-table {
	margin: 20px 0;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	overflow: hidden;
	overflow-x: auto;
	background: var(--gp-surf);
}
.gp-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	line-height: 1.6;
}
/* Kill core block-library borders (1px solid currentColor = white lines). */
.gp-content .wp-block-table table,
.gp-content .wp-block-table thead,
.gp-content .wp-block-table tbody,
.gp-content .wp-block-table tfoot,
.gp-content .wp-block-table tr,
.gp-content .wp-block-table th,
.gp-content .wp-block-table td {
	border: 0;
}
.gp-content .wp-block-table th {
	padding: 13px 18px;
	text-align: left;
	font-family: var(--gp-font-mono), monospace;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gp-gold);
	background: linear-gradient(180deg, rgba(214, 178, 114, 0.10), rgba(214, 178, 114, 0.03));
	border-bottom: 1px solid var(--gp-line-strong);
}
.gp-content .wp-block-table td {
	padding: 12px 18px;
	color: var(--gp-ink-2);
	border-top: 1px solid var(--gp-line);
	vertical-align: middle;
}
.gp-content .wp-block-table tbody tr:first-child td { border-top: 0; }
.gp-content .wp-block-table td:first-child {
	font-family: var(--gp-font-mono), monospace;
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--gp-ink);
	white-space: nowrap;
}
.gp-content .wp-block-table tbody tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.015);
}
.gp-content .wp-block-table tbody tr:hover td {
	background: rgba(214, 178, 114, 0.045);
}
.gp-content .wp-block-table td a {
	color: var(--gp-gold);
	text-decoration: none;
}
.gp-content .wp-block-table td a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Camp cards (grouped monster sections) ---------- */
.gp-content .gp-camp {
	margin-top: 22px;
	padding: 22px 24px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
}
.gp-content .gp-camp > h3 {
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px dashed var(--gp-line);
	font-size: 20px;
}
.gp-content .gp-camp > h3 a { text-decoration: none; }
.gp-content .gp-camp > h3 a:hover { color: var(--gp-gold); }
.gp-content .gp-camp .gp-monref { background: var(--gp-bg); }
.gp-content .gp-camp .gp-campboss img {
	max-width: 40px;
	max-height: 40px;
	vertical-align: middle;
	margin-right: 10px;
	image-rendering: pixelated;
}
.gp-content .gp-chip {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--gp-gold);
	border: 1px solid rgba(214, 178, 114, 0.4);
	border-radius: 999px;
	vertical-align: middle;
}

/* ---------- Weekly Task Board cards (compact item/monster grid) ---------- */
.gp-content .gp-week {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	margin: 18px 0;
}
.gp-content .gp-weekcard {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: var(--gp-bg);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
}
.gp-content .gp-weekcard-art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
}
.gp-content .gp-weekcard-art img {
	max-width: 40px;
	max-height: 40px;
	image-rendering: pixelated;
}
.gp-content .gp-weekcard-b {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.gp-content .gp-weekcard-t {
	font-size: 14px;
	line-height: 1.3;
	color: var(--gp-ink);
	text-decoration: none;
}
.gp-content a.gp-weekcard-t:hover { color: var(--gp-gold); }
.gp-content .gp-weekcard-m {
	font-size: 12px;
	color: var(--gp-ink-2);
}
.gp-content .gp-weekcard-m b { color: var(--gp-gold); }
.gp-content .gp-week-stars {
	color: var(--gp-gold);
	font-size: 12px;
	letter-spacing: 2px;
}

/* ---------- Task System (reborn filter + monster pill cells) ---------- */
.gp-content .gp-task-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 18px 0;
}
.gp-content .gp-taskf {
	padding: 7px 14px;
	font: inherit;
	font-family: var(--gp-font-mono), monospace;
	font-size: 12px;
	letter-spacing: 0.05em;
	color: var(--gp-ink-2);
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.gp-content .gp-taskf:hover {
	color: var(--gp-ink);
	border-color: rgba(214, 178, 114, 0.35);
}
.gp-content .gp-taskf.is-on {
	color: var(--gp-gold);
	background: rgba(214, 178, 114, 0.12);
	border-color: var(--gp-gold);
}
.gp-content .gp-task-mons,
.gp-content .gp-task-rew {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	height: 100%;
}
.gp-content .gp-task-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 8px;
	background: var(--gp-bg);
	border: 1px solid var(--gp-line);
	border-radius: 999px;
	font-size: 12.5px;
	white-space: nowrap;
	color: var(--gp-ink-2);
}
.gp-content .gp-task-pill img {
	max-width: 22px;
	max-height: 22px;
	image-rendering: pixelated;
}
.gp-content .gp-task-pill.is-exp {
	padding: 5px 12px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 11.5px;
	letter-spacing: 0.04em;
	color: var(--gp-gold);
}
.gp-content .gp-task-mon {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 16px 7px 10px;
	background: var(--gp-bg);
	border: 1px solid var(--gp-line);
	border-radius: 999px;
	font-size: 14px;
	white-space: nowrap;
	transition: border-color 0.15s ease;
}
.gp-content .gp-task-mon:hover { border-color: rgba(214, 178, 114, 0.4); }
.gp-content .gp-task-mon img {
	max-width: 32px;
	max-height: 32px;
	image-rendering: pixelated;
}
.gp-content .wp-block-table td .gp-task-mon a {
	color: var(--gp-ink);
	text-decoration: none;
}
.gp-content .wp-block-table td .gp-task-mon a:hover { color: var(--gp-gold); }
.gp-content .gp-task-table td:first-child { text-align: center; }

/* Daily NPC + Task Points shop tables (reuse the task-table look). */
.gp-content .gp-daily-table td,
.gp-content .gp-shop-table td { vertical-align: top; }
.gp-content .gp-daily-table .gp-task-mons,
.gp-content .gp-daily-table .gp-task-rew { height: auto; align-items: flex-start; }
.gp-content .gp-shop-table td:first-child { white-space: nowrap; }
.gp-content .gp-shop-table td:last-child { font-size: 13.5px; line-height: 1.6; }
.gp-content .gp-shop-pool {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--gp-ink-2);
}

/* ---------- Loot Finder ([gp_loot_finder] search app) ---------- */
.gp-content .gp-loot-input {
	width: 100%;
	padding: 12px 16px;
	font: inherit;
	font-size: 15px;
	color: var(--gp-ink);
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	transition: border-color 0.15s ease;
}
.gp-content .gp-loot-input:focus {
	outline: none;
	border-color: rgba(214, 178, 114, 0.5);
}
.gp-content .gp-loot-hint {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--gp-ink-3);
}
.gp-content .gp-loot-h { margin-top: 26px; }
.gp-content .gp-lootrow { display: flex; flex-direction: column; }
.gp-content .gp-lootrow > .gp-loot-item { flex: 1 0 auto; }
.gp-content button.gp-weekcard {
	width: 100%;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.gp-content .gp-loot-item:disabled { cursor: default; }
.gp-content .gp-loot-item:not(:disabled):hover { border-color: rgba(214, 178, 114, 0.45); }
.gp-content .gp-lootrow.is-open { grid-column: 1 / -1; }
.gp-content .gp-lootrow.is-open .gp-loot-item {
	border-color: rgba(214, 178, 114, 0.45);
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}
.gp-content .gp-loot-drops[hidden] { display: none; }
.gp-content .gp-loot-drops {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 2px 14px;
	padding: 8px 10px;
	background: var(--gp-surf);
	border: 1px solid rgba(214, 178, 114, 0.45);
	border-top: 0;
	border-radius: 0 0 var(--gp-r) var(--gp-r);
}
.gp-content .gp-lootdrop {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	color: var(--gp-ink);
	text-decoration: none;
	border-radius: 6px;
}
.gp-content .gp-lootdrop:hover { background: rgba(214, 178, 114, 0.06); }
.gp-content .gp-lootdrop-art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
}
.gp-content .gp-lootdrop-art img {
	max-width: 32px;
	max-height: 32px;
	image-rendering: pixelated;
}
.gp-content .gp-lootdrop-t {
	flex: 1;
	min-width: 0;
	font-size: 13.5px;
}
.gp-content .gp-lootdrop-p {
	font-family: var(--gp-font-mono), monospace;
	font-size: 12px;
	color: var(--gp-gold);
}
.gp-content .gp-loot-max {
	font-family: var(--gp-font-mono), monospace;
	font-size: 11px;
	color: var(--gp-ink-2);
}

/* ---------- Hub cards (section landing pages: Wyspy, Misje) ---------- */
.gp-content .gp-hub {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 16px;
	margin: 24px 0;
}
.gp-content .gp-hubcard {
	display: flex;
	flex-direction: column;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	overflow: hidden;
	text-decoration: none;
	color: var(--gp-ink);
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.gp-content .gp-hubcard:hover {
	border-color: var(--gp-gold);
	transform: translateY(-2px);
}
.gp-content .gp-hubcard-media {
	display: block;
	height: 170px;
	background: var(--gp-bg);
	border-bottom: 1px solid var(--gp-line);
}
.gp-content .gp-hubcard-media img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}
.gp-content .gp-hubcard-media.is-sprite,
.gp-content .gp-hubcard-media.is-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(ellipse at center, rgba(214, 178, 114, 0.08), transparent 70%), var(--gp-bg);
}
.gp-content .gp-hubcard-media.is-sprite img {
	width: auto;
	height: 96px;
	object-fit: contain;
	image-rendering: pixelated;
}
.gp-content .gp-hubcard-ico {
	width: 64px;
	height: 64px;
	display: block;
	background: var(--gp-gold);
	opacity: 0.6;
	-webkit-mask: var(--gp-ico) center / contain no-repeat;
	mask: var(--gp-ico) center / contain no-repeat;
}
.gp-content .gp-hubcard-b {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	padding: 18px 20px 20px;
}
.gp-content .gp-hubcard-badge {
	align-self: flex-start;
	padding: 2px 8px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gp-gold);
	border: 1px solid rgba(214, 178, 114, 0.4);
	border-radius: 999px;
}
.gp-content .gp-hubcard-t {
	font-family: var(--gp-font-serif), serif;
	font-size: 21px;
	line-height: 1.2;
}
.gp-content .gp-hubcard-d {
	flex: 1;
	font-size: 14px;
	line-height: 1.55;
	color: var(--gp-ink-2);
}
.gp-content .gp-hubcard-cta {
	font-family: var(--gp-font-mono), monospace;
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gp-gold);
}

/* ---------- Media + text (content pages) ---------- */
.gp-content .wp-block-media-text {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 0;
	margin: 20px 0;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	overflow: hidden;
}
.gp-content .wp-block-media-text__media {
	margin: 0;
	height: 100%;
}
.gp-content .wp-block-media-text__media img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}
.gp-content .wp-block-media-text__content {
	padding: 28px;
}
.gp-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
.gp-content .wp-block-media-text__content > :first-child { margin-top: 0; }
.gp-content .wp-block-media-text__content > :last-child { margin-bottom: 0; }
@media (max-width: 720px) {
	.gp-content .wp-block-media-text { grid-template-columns: 1fr; }
}

/* Section divider — a soft gold rule that fades at both ends. Used to separate
   stacked media-text cards / images so they don't read as one bunched block. */
.gp-content .wp-block-separator {
	border: 0;
	height: 1px;
	width: 100%;
	max-width: 180px;
	margin: 30px auto;
	background: linear-gradient(90deg, transparent, var(--gp-line-strong), transparent);
}

/* ---------- Boss form / summon cards (image + details side by side) ---------- */
.gp-content .gp-boss-form {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	flex-wrap: wrap;
}
.gp-content .gp-boss-form-art {
	flex: 0 0 auto;
	width: 104px;
	height: 104px;
	object-fit: contain;
	image-rendering: pixelated;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	padding: 10px;
}
.gp-content .gp-boss-form-b {
	flex: 1 1 240px;
	min-width: 220px;
}
.gp-content .gp-boss-form-b > :first-child { margin-top: 0; }
@media (max-width: 520px) {
	.gp-content .gp-boss-form-art { width: 80px; height: 80px; }
}

/* ---------- Gem icons (Wheel of Destiny tables/lists) ---------- */
.gp-content .gp-gem {
	width: 34px;
	height: 34px;
	display: block;
	image-rendering: pixelated;
}
.gp-content .gp-gem--inline {
	display: inline-block;
	width: 26px;
	height: 26px;
	vertical-align: middle;
	margin-right: 6px;
}
.gp-tab-list--gems li {
	display: flex;
	align-items: center;
	gap: 12px;
}
.gp-tab-list--gems .gp-gem { flex: 0 0 auto; }

/* ---------- Element / tier icons (shared: monster pages + cards) ----------
 * Base is a rotated diamond, reused by the loot-tier markers (gp-tier-ico--*).
 * The element variants below override it with the real 16×16 sprite icons.   */
.gp-elem-ico {
	width: 10px;
	height: 10px;
	flex: 0 0 auto;
	display: inline-block;
	transform: rotate(45deg);
	border-radius: 2px;
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}
/* Element resistance icons: the real sprite framed in a small rounded chip
 * (so it reads as a contained badge, not a bare floating icon). */
[class*="gp-elem-ico--"] {
	width: 24px;
	height: 24px;
	transform: none;
	border-radius: 6px;
	box-shadow: none;
	background-color: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--gp-line);
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	image-rendering: pixelated;
}
.gp-elem-ico--physical { background-image: url(../img/elements/physical.gif); }
.gp-elem-ico--earth    { background-image: url(../img/elements/earth.gif); }
.gp-elem-ico--energy   { background-image: url(../img/elements/energy.gif); }
.gp-elem-ico--fire     { background-image: url(../img/elements/fire.gif); }
.gp-elem-ico--ice      { background-image: url(../img/elements/ice.gif); }
.gp-elem-ico--holy     { background-image: url(../img/elements/holy.gif); }
.gp-elem-ico--death    { background-image: url(../img/elements/death.gif); }

/* ---------- Damage dealt — ranked bars (single monster page) ----------
 * Expected-DPS share per damage type, longest first; bar width is relative to
 * the leading type. The 7 elements reuse their sprite chips; drown / drains /
 * agony have no sprite, so they fall back to a colour-tinted tile. */
.gp-dmg-list { display: flex; flex-direction: column; gap: 9px; }
.gp-dmg {
	display: grid;
	grid-template-columns: 150px 1fr 44px;
	align-items: center;
	gap: 14px;
}
.gp-dmg-l { display: inline-flex; align-items: center; gap: 9px; color: var(--gp-ink); font-size: 13.5px; }
.gp-dmg-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--gp-surf-2);
	border: 1px solid var(--gp-line);
	overflow: hidden;
}
.gp-dmg-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--gp-dmg-c, var(--gp-gold));
	box-shadow: 0 0 8px var(--gp-dmg-c, transparent);
}
.gp-dmg-v {
	font-family: var(--gp-font-mono), monospace;
	font-size: 12.5px;
	color: var(--gp-ink);
	text-align: right;
}
.gp-dmg--drown .gp-dmg-ico,
.gp-dmg--lifedrain .gp-dmg-ico,
.gp-dmg--manadrain .gp-dmg-ico,
.gp-dmg--agony .gp-dmg-ico {
	background-image: none;
	background-color: var(--gp-dmg-c);
	border-color: transparent;
}
.gp-dmg--physical  { --gp-dmg-c: #b9b1a4; }
.gp-dmg--fire      { --gp-dmg-c: #d98b5f; }
.gp-dmg--ice       { --gp-dmg-c: #6fb4d9; }
.gp-dmg--energy    { --gp-dmg-c: #c9a0e8; }
.gp-dmg--earth     { --gp-dmg-c: #8fb06a; }
.gp-dmg--death     { --gp-dmg-c: #9a8ab0; }
.gp-dmg--holy      { --gp-dmg-c: #e0cf8a; }
.gp-dmg--drown     { --gp-dmg-c: #5fc7c0; }
.gp-dmg--lifedrain { --gp-dmg-c: #c4756a; }
.gp-dmg--manadrain { --gp-dmg-c: #6f8fd9; }
.gp-dmg--agony     { --gp-dmg-c: #b58fc0; }
@media (max-width: 520px) {
	.gp-dmg { grid-template-columns: 110px 1fr 38px; gap: 10px; }
	.gp-dmg-l { font-size: 12.5px; }
}

/* ---------- Monster cards ([gp_monsters] shortcode) ---------- */
.gp-mons {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 12px;
	margin: 16px 0;
}
.gp-moncard {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 16px;
	background: var(--gp-bg);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	text-decoration: none;
	color: var(--gp-ink);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.gp-content .gp-moncard { text-decoration: none; }
.gp-moncard:hover {
	border-color: rgba(214, 178, 114, 0.45);
	background: rgba(214, 178, 114, 0.05);
}
.gp-moncard-top {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}
.gp-moncard-art {
	width: 84px;
	height: 84px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	background: var(--gp-surf);
	border-radius: 8px;
	overflow: hidden;
}
.gp-moncard-art img {
	max-width: 76px;
	max-height: 76px;
	image-rendering: pixelated;
}
.gp-moncard-b { min-width: 0; }
.gp-moncard-t {
	display: block;
	font-size: 15px;
	line-height: 1.3;
	margin-bottom: 6px;
}
.gp-moncard:hover .gp-moncard-t { color: var(--gp-gold); }
.gp-moncard-s {
	display: flex;
	gap: 14px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--gp-ink-3);
	white-space: nowrap;
}
.gp-moncard-s b {
	color: var(--gp-gold);
	font-weight: 700;
	font-size: 12.5px;
}
.gp-moncard-st {
	display: block;
	font-size: 12px;
	letter-spacing: 2px;
	color: var(--gp-gold);
}
/* Large variant: hero display (no stats), e.g. charm spot cards */
.gp-mons--lg .gp-moncard { padding: 16px 18px; gap: 18px; }
.gp-mons--lg .gp-moncard-art { width: 88px; height: 88px; }
.gp-mons--lg .gp-moncard-art img { max-width: 80px; max-height: 80px; }
.gp-mons--lg .gp-moncard-t {
	font-family: var(--gp-font-serif), serif;
	font-size: 19px;
	margin-bottom: 0;
}

.gp-moncard-e {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	padding-top: 12px;
	border-top: 1px solid var(--gp-line);
}
.gp-mel {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 10.5px;
	color: var(--gp-ink-3);
	white-space: nowrap;
}
.gp-mel .gp-elem-ico { width: 22px; height: 22px; background-size: 15px 15px; }
.gp-mel b { font-weight: 600; color: #fff; }
.gp-mel b.is-below { color: #e8c84c; }
.gp-mel b.is-above { color: #5cbf60; }

/* ---------- Crafting cards (Hero EQ etc.) ---------- */
.gp-craft-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}
.gp-craft {
	padding: 14px 16px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
}
.gp-craft-h {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px dashed var(--gp-line);
	font-size: 14px;
}
.gp-craft-h a { color: var(--gp-gold); text-decoration: none; }
.gp-craft-h a:hover { text-decoration: underline; text-underline-offset: 2px; }
.gp-craft-src {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--gp-ink-2);
}
.gp-mats {
	list-style: none;
	margin: 0;
	padding: 0;
}
.gp-mats li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	font-size: 13px;
	color: var(--gp-ink-2);
}
.gp-mats li + li { border-top: 1px dashed rgba(255, 255, 255, 0.05); }
.gp-mats b {
	font-family: var(--gp-font-mono), monospace;
	font-size: 12px;
	color: var(--gp-gold);
	white-space: nowrap;
}
/* Material rows with item icons + links (e.g. Marvell crafting). */
.gp-mats--icons li { align-items: center; }
.gp-content .gp-mat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--gp-ink-2);
}
.gp-content .gp-mat:hover { color: var(--gp-gold); }
.gp-mat-ico {
	width: 26px;
	height: 26px;
	flex: 0 0 auto;
	image-rendering: pixelated;
}

/* ---------- Video embeds (content pages) ---------- */
.gp-content .gp-video {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 16px 0;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	overflow: hidden;
	background: #000;
}
.gp-content .gp-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Tabs (content pages) ---------- */
.gp-tabs { margin: 20px 0; }
/* Tab strip follows the wiki filter-bar pattern: a simple wrapping row,
   divided from the panel below by a single bottom rule (no boxed band). */
.gp-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	padding-top: 18px;
	padding-bottom: 18px;
	border-top: 1px solid var(--gp-line);
	border-bottom: 1px solid var(--gp-line);
}
/* Each tab is a square (rounded-rect) button. Inactive tabs carry a clearly
   visible lifted surface + gold-tinted border so they read as buttons on their
   own; the active tab gets a gold tint + full gold border + gold text. */
.gp-tab-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	font: inherit;
	font-size: 14.5px;
	color: var(--gp-ink-2);
	background: var(--gp-surf-2);
	border: 1px solid var(--gp-line-strong);
	border-radius: 10px;
	cursor: pointer;
	transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.gp-tab-btn:hover {
	color: var(--gp-ink);
	background: var(--gp-surf-2);
	border-color: var(--gp-gold);
}
.gp-tab-btn.is-on {
	color: var(--gp-gold);
	background: rgba(214, 178, 114, 0.18);
	border-color: var(--gp-gold);
}
.gp-tab-panel { display: none; }
.gp-tab-panel.is-on { display: block; }

/* Icon tabs (Upgrade equipment-slot tables): masked SVG icon + label + count.
   Icons reuse the sidebar set + mask, inheriting the chip's text color (muted
   ink inactive, gold on the active chip). Count is a quiet mono suffix. */
.gp-tab-ico {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: var(--gp-ico) center / contain no-repeat;
	mask: var(--gp-ico) center / contain no-repeat;
	opacity: 0.85;
}
.gp-tab-btn.is-on .gp-tab-ico { opacity: 1; }
.gp-tab-cnt {
	font-family: var(--gp-font-mono), monospace;
	font-size: 10px;
	line-height: 1;
	opacity: 0.7;
}

/* Top-level section switcher (Killing / Daily / Rewards) — a segmented
   control, visually distinct from the nested per-location tabs. Direct-child
   selectors keep the nested gp-tabs inside each panel on the underline style. */
.gp-tabs--top { margin-top: 8px; }
.gp-tabs--top > .gp-tabs-nav {
	gap: 6px;
	padding: 6px;
	margin-bottom: 24px;
	border: 1px solid var(--gp-line);
	border-bottom: 1px solid var(--gp-line);
	border-radius: 12px;
	background: var(--gp-surf);
}
.gp-tabs--top > .gp-tabs-nav > .gp-tab-btn {
	flex: 1 1 auto;
	text-align: center;
	padding: 12px 18px;
	font-size: 13px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	margin-bottom: 0;
}
.gp-tabs--top > .gp-tabs-nav > .gp-tab-btn:hover {
	color: var(--gp-ink);
	background: rgba(214, 178, 114, 0.08);
	border-bottom-color: transparent;
}
.gp-tabs--top > .gp-tabs-nav > .gp-tab-btn.is-on {
	color: var(--gp-gold);
	background: rgba(214, 178, 114, 0.16);
	border-bottom-color: transparent;
}
.gp-tab-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	background: var(--gp-surf);
	overflow: hidden;
}
.gp-tab-list li {
	padding: 11px 16px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--gp-ink-2);
}
.gp-tab-list li + li { border-top: 1px solid var(--gp-line); }
.gp-tab-list li a { color: var(--gp-gold); }

/* ---------- Monster reference chips (content pages) ---------- */
.gp-monrefs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}
.gp-content .gp-monrefs a,
.gp-content .gp-monref { text-decoration: none; }
.gp-monref {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 8px;
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	text-decoration: none;
	color: var(--gp-ink);
	font-size: 13.5px;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.gp-monref:hover {
	border-color: rgba(214, 178, 114, 0.45);
	background: rgba(214, 178, 114, 0.06);
	color: var(--gp-gold);
}
.gp-monref-art {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	background: var(--gp-bg);
	border-radius: 6px;
	overflow: hidden;
}
.gp-monref-art img {
	max-width: 32px;
	max-height: 32px;
	image-rendering: pixelated;
}

@media (max-width: 900px) {
	.gp-brand { width: auto; }
	.gp-brand-text { display: none; }

	.gp-seg-l { display: none; }
	.gp-search { display: none; }

	.gp-nav-toggle { display: inline-flex; }

	/* Desktop is an app shell (body overflow:hidden, .gp-main scrolls inside
	   the grid). display:block breaks that height chain, so the page couldn't
	   scroll at all on mobile — make .gp-body the scroll container instead. */
	.gp-body {
		display: block;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.gp-side {
		position: fixed;
		top: calc(var(--gp-header-h) + var(--gp-admin-bar));
		left: 0;
		bottom: 0;
		width: min(86vw, var(--gp-sidebar-w));
		transform: translateX(-100%);
		transition: transform 220ms ease;
		z-index: 60;
		background: var(--gp-bg-2);
	}
	body.is-nav-open .gp-side { transform: translateX(0); }

	.gp-main-inner { padding: 24px 18px 64px; }
}

@media (min-width: 901px) {
	.gp-nav-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.gp-app *,
	.gp-app *::before,
	.gp-app *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ============================================================
   GLOBAL SEARCH — command palette overlay
   ============================================================ */
.gp-cmd {
	position: fixed;
	inset: var(--gp-admin-bar) 0 0 0;
	z-index: 200;
	display: flex;
	justify-content: center;
	align-items: flex-start;
}
.gp-cmd[hidden] { display: none; }

.gp-cmd-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 9, 12, 0.62);
	backdrop-filter: blur(2px);
}

.gp-cmd-panel {
	position: relative;
	width: min(640px, calc(100vw - 32px));
	margin-top: min(12vh, 96px);
	max-height: min(70vh, 560px);
	display: flex;
	flex-direction: column;
	background: var(--gp-bg-2);
	border: 1px solid var(--gp-line-strong);
	border-radius: var(--gp-r-2);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}

.gp-cmd-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--gp-line);
	flex-shrink: 0;
}
.gp-cmd-ico { color: var(--gp-ink-3); display: inline-flex; flex-shrink: 0; }
.gp-cmd-input {
	flex: 1;
	min-width: 0;
	height: 30px;
	border: 0;
	background: none;
	font-size: 16px;
	color: var(--gp-ink);
}
.gp-cmd-input:focus { outline: 0; }
.gp-cmd-input::placeholder { color: var(--gp-ink-3); }
.gp-cmd-esc {
	flex-shrink: 0;
	padding: 3px 8px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 10.5px;
	color: var(--gp-ink-3);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--gp-line);
	border-radius: 4px;
}
.gp-cmd-esc:hover { color: var(--gp-ink-2); border-color: var(--gp-line-strong); }

.gp-cmd-list {
	flex: 1;
	overflow-y: auto;
	padding: 6px;
}
.gp-cmd-list::-webkit-scrollbar { width: 10px; }
.gp-cmd-list::-webkit-scrollbar-thumb { background: rgba(214, 178, 114, 0.15); border-radius: 10px; }
.gp-cmd-list::-webkit-scrollbar-track { background: transparent; }

.gp-cmd-group { padding: 4px 0 8px; }
.gp-cmd-grouphead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px 4px;
	font-family: var(--gp-font-mono), monospace;
	font-size: 9.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gp-ink-3);
}
.gp-cmd-clear {
	font-family: var(--gp-font-mono), monospace;
	font-size: 9.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gp-ink-3);
}
.gp-cmd-clear:hover { color: var(--gp-gold); }

.gp-cmd-row,
.gp-cmd-recent {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 8px 10px;
	border-radius: var(--gp-r);
	color: var(--gp-ink);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.gp-cmd-row.is-active,
.gp-cmd-recent.is-active {
	background: var(--gp-surf-2);
	color: var(--gp-ink);
}
.gp-cmd-row.is-active .gp-cmd-row-t { color: var(--gp-gold-bright); }

.gp-cmd-art {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gp-ink-3);
}
.gp-cmd-art img {
	max-width: 28px;
	max-height: 28px;
	width: auto;
	height: auto;
	object-fit: contain;
	image-rendering: pixelated;
}
.gp-cmd-glyph {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--gp-font-serif), serif;
	font-size: 14px;
	color: var(--gp-gold);
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: 5px;
}
.gp-cmd-row-t {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
}

.gp-cmd-more {
	padding: 4px 10px 2px 49px;
	font-size: 11.5px;
	color: var(--gp-ink-3);
}

/* Shortcuts: horizontal wrap of squared chips (matches the tile cards). */
.gp-cmd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 4px 10px 2px;
}
.gp-cmd-chip {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	font-size: 13px;
	color: var(--gp-ink-2);
	background: var(--gp-surf);
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-r);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 140ms, background 140ms;
}
.gp-cmd-chip:hover,
.gp-cmd-chip.is-active {
	color: var(--gp-gold-bright);
	background: var(--gp-surf-2);
	border-color: var(--gp-line-strong);
}

.gp-cmd-empty { padding: 40px 20px; text-align: center; }
.gp-cmd-empty-t {
	margin: 0 0 4px;
	font-family: var(--gp-font-serif), serif;
	font-size: 18px;
	color: var(--gp-ink);
}
.gp-cmd-empty-d { margin: 0; font-size: 13px; color: var(--gp-ink-3); }

/* Lock the content scroll while the palette is open. */
body.is-search-open .gp-main { overflow: hidden; }

@media (max-width: 900px) {
	/* Full-screen sheet on small viewports (minus the admin bar if shown). */
	.gp-cmd-panel {
		width: 100vw;
		max-width: 100vw;
		height: calc(100dvh - var(--gp-admin-bar));
		max-height: calc(100dvh - var(--gp-admin-bar));
		margin-top: 0;
		border: 0;
		border-radius: 0;
	}
}

@media (max-width: 900px) {
	/* Re-expose the header search as a compact icon trigger so the palette
	   stays reachable (⌘K needs a keyboard); it opens as the sheet above. */
	.gp-search {
		display: block;
		flex: 0 0 auto;
		width: 38px;
		/* Sit directly left of the hamburger instead of floating mid-header. */
		margin-left: auto;
	}
	.gp-search-input {
		padding: 0;
		color: transparent;
		text-indent: -9999px;
		/* iOS auto-zooms the page when a focused input is under 16px —
		   the text is invisible anyway, so size is free. */
		font-size: 16px;
	}
	.gp-search-input::placeholder { color: transparent; }
	.gp-search-icon { left: 11px; }
	.gp-search-kbd { display: none; }
}
