/*!
 * Prime Minister – The Nation Is In Your Hands  ·  v1.1 cinematic UI
 * Fully scoped under #pmg-app; the active theme cannot leak in.
 */

.pmg-host { position: relative; width: 100%; max-width: none; margin: 0; padding: 0; }
body.pmg-standalone-body { margin: 0; background: #02040a; overflow: hidden; }
body.pmg-lock { overflow: hidden !important; }

#pmg-app {
	--ink-0: #02040a;
	--navy-950: #040812;
	--navy-900: #070d1c;
	--navy-850: #0b1428;
	--navy-800: #101c38;
	--navy-700: #18284c;
	--gold: #d4af37;
	--gold-2: #f3d78a;
	--gold-3: #fff2c9;
	--gold-dim: #8f7426;
	--red: #d63a3a;
	--red-2: #ff6464;
	--pink: #e78fb3;
	--pink-2: #ffc3da;
	--ink: #eef1f7;
	--ink-2: #b3bccd;
	--ink-3: #737f96;
	--line: rgba(212, 175, 55, .22);
	--line-2: rgba(255, 255, 255, .08);
	--paper: #f3ead3;
	--paper-2: #e4d6b4;
	--paper-ink: #2a2214;
	--good: #f0c75e;
	--bad: #ff6b66;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--ease-out: cubic-bezier(.16, 1, .3, 1);
	--serif: "Cinzel", "Trajan Pro", "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--story: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--mono: "Courier Prime", "Courier New", ui-monospace, Menlo, Consolas, monospace;
	--script: "Segoe Script", "Brush Script MT", "Lucida Handwriting", "Apple Chancery", cursive;
	--deva: "Noto Serif Devanagari", "Mangal", "Kohinoor Devanagari", serif;
	--hud-h: 58px;
	--dock-h: 64px;
	--rail-w: 252px;

	all: initial;
	display: block;
	position: relative;
	container-type: inline-size;
	container-name: pmg;
	width: 100%;
	height: min(100vh, 920px);
	min-height: 640px;
	overflow: hidden;
	background: var(--ink-0);
	color: var(--ink);
	font: 15px/1.55 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-align: left;
	isolation: isolate;
	border-radius: 12px;
	user-select: none;
	-webkit-tap-highlight-color: transparent;

	&.pmg-fixed, &:fullscreen { position: fixed; inset: 0; height: 100vh; height: 100dvh; min-height: 0; z-index: 999999; border-radius: 0; }

	/* ---------- Reset ---------- */
	*, *::before, *::after { box-sizing: border-box; }
	:where(div, span, section, article, aside, header, footer, nav, main, p, ul, ol, li, figure, small, strong, em, b, i, label, table, tr, td, th, thead, tbody, blockquote, h1, h2, h3, h4) {
		margin: 0; padding: 0; border: 0; font: inherit; color: inherit; background: none; letter-spacing: normal; text-transform: none; text-shadow: none; box-shadow: none; line-height: inherit; list-style: none; float: none; width: auto; max-width: none; min-height: 0; text-align: inherit;
	}
	:where(button, input, select, textarea) { font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none; box-shadow: none; text-shadow: none; min-height: 0; width: auto; line-height: 1.3; }
	:where(button) { all: unset; box-sizing: border-box; cursor: pointer; }
	:where(button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible) { outline: 2px solid var(--gold-2); outline-offset: 3px; }
	:where(a) { color: var(--gold-2); text-decoration: none; }
	:where(svg) { display: block; max-width: none; height: auto; overflow: visible; }
	:where(input, textarea) { user-select: text; }
	:where(strong, b) { font-weight: 700; }

	/* ---------- Boot ---------- */
	.pmg-boot { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--ink-2); font-family: var(--serif); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
	.pmg-emblem-spin { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: pmg-spin 1s linear infinite; }

	/* ---------- Scene backdrop (crossfading layers, slow Ken Burns) ---------- */
	.pmg-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ink-0); }
	.pmg-bg .sc { position: absolute; inset: -3%; opacity: 0; transition: opacity 1.3s var(--ease), transform 14s linear; transform: scale(1.02); will-change: opacity, transform; }
	.pmg-bg .sc.on { opacity: 1; transform: scale(1.09) translate(-1%, -1%); }
	.pmg-bg .sc svg { width: 100%; height: 100%; }
	.pmg-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
		radial-gradient(110% 85% at 50% 30%, transparent 35%, rgba(2, 4, 10, .55) 72%, rgba(2, 4, 10, .92)),
		linear-gradient(180deg, rgba(2, 4, 10, .55), transparent 22%, transparent 55%, rgba(2, 4, 10, .9)); transition: background .8s; }
	.pmg-veil.dim { background: rgba(2, 4, 10, .78); }
	.pmg-veil.black { background: #000; }
	.pmg-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .055; mix-blend-mode: overlay; background-image: repeating-radial-gradient(circle at 17% 32%, #fff 0 1px, transparent 1px 3px), repeating-radial-gradient(circle at 73% 61%, #fff 0 1px, transparent 1px 4px); }
	.pmg-alarm { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(90% 70% at 50% 50%, transparent 50%, rgba(214, 58, 58, .38)); transition: opacity .6s; }
	.pmg-alarm.on { opacity: 1; animation: pmg-pulse 1.8s ease-in-out infinite; }
	.pmg-layer { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; }
	.pmg-layer > * { flex-shrink: 0; }

	/* ---------- Typography ---------- */
	.pmg-kicker { font-family: var(--serif); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
	.pmg-muted { color: var(--ink-2); }
	.pmg-dim { color: var(--ink-3); }
	.pmg-deva { font-family: var(--deva); }
	.pmg-num { font-variant-numeric: tabular-nums; }
	.pmg-goldtext { background: linear-gradient(180deg, var(--gold-3), var(--gold-2) 45%, var(--gold) 75%, #8a6a17); -webkit-background-clip: text; background-clip: text; color: transparent; }

	/* ---------- Buttons ---------- */
	.pmg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px; border-radius: 3px; font-family: var(--serif); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
		color: #1b1405; background: linear-gradient(180deg, var(--gold-3), var(--gold-2) 30%, var(--gold) 70%, #a5821c); box-shadow: 0 8px 26px rgba(212, 175, 55, .28), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(0, 0, 0, .2); transition: transform .2s var(--ease), box-shadow .2s, filter .2s; white-space: nowrap; position: relative; overflow: hidden; }
	.pmg-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
	.pmg-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(212, 175, 55, .42), inset 0 1px 0 rgba(255, 255, 255, .6); }
	.pmg-btn:hover::after { transform: translateX(120%); }
	.pmg-btn[disabled] { filter: grayscale(.85) brightness(.55); cursor: not-allowed; transform: none; }
	.pmg-btn.ghost { color: var(--gold-2); background: rgba(4, 8, 18, .55); border: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(6px); }
	.pmg-btn.ghost:hover { border-color: var(--gold); background: rgba(212, 175, 55, .1); }
	.pmg-btn.red { color: #fff; background: linear-gradient(180deg, #ff8080, var(--red) 55%, #9a2020); box-shadow: 0 8px 26px rgba(214, 58, 58, .35); }
	.pmg-btn.pink { color: #2a0d18; background: linear-gradient(180deg, #ffe0ec, var(--pink) 60%, #b35a80); box-shadow: 0 8px 26px rgba(231, 143, 179, .3); }
	.pmg-btn.sm { padding: 8px 15px; font-size: 11px; letter-spacing: .12em; }
	.pmg-btn.lg { padding: 16px 38px; font-size: 14px; letter-spacing: .22em; }
	.pmg-icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(4, 8, 18, .5); color: var(--ink-2); transition: .2s; position: relative; }
	.pmg-icon-btn:hover, .pmg-icon-btn.on { color: var(--gold-2); border-color: var(--line); background: rgba(212, 175, 55, .1); }
	.pmg-icon-btn svg { width: 18px; height: 18px; }

	.pmg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink-2); white-space: nowrap; }
	.pmg-chip.good { color: var(--good); border-color: rgba(240, 199, 94, .35); background: rgba(240, 199, 94, .09); }
	.pmg-chip.bad { color: var(--bad); border-color: rgba(255, 107, 102, .35); background: rgba(255, 107, 102, .09); }
	.pmg-chip.time { color: #a9cbff; border-color: rgba(169, 203, 255, .3); background: rgba(169, 203, 255, .08); }
	.pmg-chip.pink { color: var(--pink-2); border-color: rgba(231, 143, 179, .35); background: rgba(231, 143, 179, .1); }
	.pmg-chip.red { color: #fff; background: var(--red); border-color: var(--red); }

	/* ---------- Title screen ---------- */
	.pmg-title { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 24px; text-align: center; overflow: auto; }
	.pmg-title-inner { max-width: 760px; display: grid; justify-items: center; gap: 12px; }
	.pmg-title-inner > * { opacity: 0; animation: pmg-rise 1.1s var(--ease-out) forwards; }
	.pmg-title .pmg-h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(42px, 8.5cqi, 92px); letter-spacing: .14em; line-height: 1; text-transform: uppercase; filter: drop-shadow(0 6px 26px rgba(0, 0, 0, .7)); }
	.pmg-title .sub { font-family: var(--serif); letter-spacing: .46em; text-transform: uppercase; font-size: clamp(11px, 1.7cqi, 15px); color: var(--ink); }
	.pmg-title .pmg-deva { color: var(--gold-2); font-size: 18px; opacity: .85; }
	.pmg-rule { width: 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
	.pmg-rule.red { height: 2px; width: 120px; background: var(--red); box-shadow: 0 0 14px var(--red); }
	.pmg-menu { display: grid; gap: 10px; margin-top: 16px; width: min(380px, 100%); }
	.pmg-menu .pmg-btn { width: 100%; }
	.pmg-foot { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--ink-3); letter-spacing: .12em; padding: 0 16px; }
	.pmg-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
	.pmg-particles i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold); opacity: 0; animation: pmg-float linear infinite; }
	.pmg-emblem { filter: drop-shadow(0 0 22px rgba(212, 175, 55, .45)); }

	/* ---------- Wizard (story-styled) ---------- */
	.pmg-wizard { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 24px 16px 40px; }
	.pmg-wiz { width: min(900px, 100%); animation: pmg-rise .7s var(--ease-out) both; text-align: center; }
	.pmg-wiz .pmg-h2 { font-family: var(--serif); font-size: clamp(24px, 4cqi, 38px); letter-spacing: .06em; margin: 10px 0 6px; }
	.pmg-wiz .lead { font-family: var(--story); font-style: italic; font-size: 19px; color: var(--ink-2); margin: 0 auto 22px; max-width: 640px; }
	.pmg-steps { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
	.pmg-steps i { width: 32px; height: 2px; background: var(--line-2); }
	.pmg-steps i.on { background: var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, .6); }
	.pmg-options { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
	.pmg-option { position: relative; width: min(260px, 100%); padding: 18px 16px; border-radius: 6px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(16, 28, 56, .65), rgba(4, 8, 18, .8)); text-align: center; transition: .3s var(--ease); display: grid; gap: 6px; justify-items: center; backdrop-filter: blur(6px); }
	.pmg-option:hover { border-color: var(--line); transform: translateY(-3px); }
	.pmg-option.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 18px 40px rgba(212, 175, 55, .18); }
	.pmg-option .t { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
	.pmg-option .d { font-size: 13px; color: var(--ink-2); }
	.pmg-option.diff-nightmare.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset, 0 18px 40px rgba(214, 58, 58, .25); }
	.pmg-option .pmg-portrait { width: 150px; height: 170px; }
	.pmg-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: left; max-width: 720px; margin: 0 auto; }
	.pmg-field { display: grid; gap: 6px; }
	.pmg-label { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-family: var(--serif); }
	.pmg-input { all: unset; box-sizing: border-box; width: 100%; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--ink); font: 19px var(--story); transition: border-color .2s; user-select: text; }
	.pmg-input:focus { border-color: var(--gold-2); }
	.pmg-seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(2, 4, 10, .55); gap: 4px; flex-wrap: wrap; justify-content: center; }
	.pmg-seg button { padding: 8px 15px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
	.pmg-seg button.on { background: var(--gold); color: #1a1306; font-weight: 700; }
	.pmg-seg.pink button.on { background: var(--pink); color: #2a0d18; }
	.pmg-namecard { display: flex; gap: 22px; align-items: center; justify-content: center; margin: 0 auto 22px; flex-wrap: wrap; }
	.pmg-namecard .n { font-family: var(--serif); font-size: clamp(26px, 4.4cqi, 40px); letter-spacing: .05em; }
	.pmg-namecard .meta { font-family: var(--story); font-style: italic; color: var(--ink-2); font-size: 17px; }
	.pmg-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 6px; border: 1px solid rgba(231, 143, 179, .3); background: rgba(231, 143, 179, .07); cursor: pointer; text-align: left; max-width: 640px; margin: 18px auto 0; }
	.pmg-toggle input { accent-color: var(--pink); width: 18px; height: 18px; margin-top: 2px; flex: none; }
	.pmg-wiz-nav { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

	/* ---------- HUD (persistent status bar) ---------- */
	.pmg-hud { height: var(--hud-h); display: flex; align-items: center; gap: 14px; padding: 0 14px; z-index: 6; background: linear-gradient(180deg, rgba(2, 4, 10, .92), rgba(2, 4, 10, .6) 70%, transparent); }
	.pmg-hud-pm { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
	.pmg-hud-pm .pmg-portrait { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); overflow: hidden; flex: none; background: var(--navy-800); }
	.pmg-hud-pm .nm { font-family: var(--serif); font-size: 13px; letter-spacing: .08em; color: var(--gold-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.pmg-hud-pm .sub { font-size: 11px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
	.pmg-hud-stats { flex: 1; display: flex; justify-content: center; gap: 4px; min-width: 0; }
	.pmg-hs { display: grid; gap: 0; padding: 4px 12px; border-left: 1px solid var(--line-2); text-align: center; min-width: 0; position: relative; }
	.pmg-hs:first-child { border-left: 0; }
	.pmg-hs .k { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
	.pmg-hs .v { font-family: var(--serif); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
	.pmg-hs .v.low { color: var(--red-2); }
	.pmg-hs .v.hi { color: var(--gold-2); }
	.pmg-hud-right { display: flex; gap: 6px; align-items: center; }
	.pmg-ap { display: flex; gap: 10px; align-items: center; padding: 0 8px; }
	.pmg-pips { display: flex; gap: 4px; }
	.pmg-pips i { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); }
	.pmg-pips i.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
	.pmg-pips.pt i { border-color: var(--pink); border-radius: 50%; transform: none; }
	.pmg-pips.pt i.on { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
	.pmg-flash-good { animation: pmg-fgood 1.4s ease; }
	.pmg-flash-bad { animation: pmg-fbad 1.4s ease; }
	.pmg-float { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font: 700 12px var(--sans); white-space: nowrap; pointer-events: none; animation: pmg-floatup 1.8s var(--ease-out) forwards; text-shadow: 0 2px 8px #000; }
	.pmg-float.good { color: var(--good); } .pmg-float.bad { color: var(--bad); }

	/* ---------- Main area ---------- */
	.pmg-main { flex: 1 1 auto; min-height: 0; display: flex; position: relative; }
	.pmg-stage { flex: 1; min-width: 0; position: relative; overflow: hidden; }
	.pmg-rail { width: var(--rail-w); flex: none; overflow-y: auto; padding: 6px 12px 16px 6px; z-index: 4; scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; transition: transform .45s var(--ease), opacity .45s, width .45s var(--ease); }
	.pmg-rail.hide { width: 0; padding: 0; opacity: 0; transform: translateX(30px); overflow: hidden; visibility: hidden; }
	.pmg-rail .grp { font-family: var(--serif); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin: 12px 4px 6px; }
	.pmg-rs { padding: 7px 10px 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(4, 8, 18, .72), rgba(4, 8, 18, .45)); border-left: 2px solid transparent; margin-bottom: 4px; backdrop-filter: blur(4px); position: relative; }
	.pmg-rs .r { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
	.pmg-rs .l { color: var(--ink-2); }
	.pmg-rs .v { font-weight: 700; font-variant-numeric: tabular-nums; }
	.pmg-rs .bar { margin-top: 5px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
	.pmg-rs .bar i { display: block; height: 100%; transition: width 1.2s var(--ease), background .6s; }
	.pmg-rs.pmg-flash-good { border-left-color: var(--good); }
	.pmg-rs.pmg-flash-bad { border-left-color: var(--bad); }
	.pmg-seatbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; }
	.pmg-seatbar i { height: 100%; }

	/* ---------- Location dock ---------- */
	.pmg-dock { height: var(--dock-h); display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 10px env(safe-area-inset-bottom); z-index: 6; background: linear-gradient(0deg, rgba(2, 4, 10, .96), rgba(2, 4, 10, .7) 70%, transparent); overflow-x: auto; scrollbar-width: none; }
	.pmg-dock::-webkit-scrollbar { display: none; }
	.pmg-dock button { flex: 0 0 auto; display: grid; justify-items: center; gap: 3px; padding: 7px 11px; border-radius: 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); position: relative; transition: color .2s, background .2s; }
	.pmg-dock button svg { width: 21px; height: 21px; }
	.pmg-dock button:hover { color: var(--ink); }
	.pmg-dock button.on { color: var(--gold-2); }
	.pmg-dock button.on::after { content: ""; position: absolute; bottom: 1px; left: 30%; right: 30%; height: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
	.pmg-dock button.home.on::after { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
	.pmg-dock .badge { position: absolute; top: 3px; right: 9px; min-width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

	/* ==================================================================
	 * Visual-novel story stage
	 * ================================================================ */
	.pmg-vn { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 clamp(10px, 3cqi, 40px) 14px; cursor: pointer; }
	.pmg-vn > [class$="-host"] { width: 100%; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 3; }
	.pmg-stage:focus, .pmg-stage:focus-visible { outline: none; }
	.pmg-cast { position: absolute; left: 0; right: 0; bottom: 0; top: 0; pointer-events: none; }
	.pmg-actor { position: absolute; bottom: 118px; width: clamp(170px, 24cqi, 300px); transition: transform .7s var(--ease-out), opacity .7s, filter .5s, left .7s var(--ease-out); opacity: 0; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); }
	.pmg-actor.l { left: 6%; transform: translateX(-60px); }
	.pmg-actor.r { right: 6%; transform: translateX(60px); }
	.pmg-actor.in { opacity: 1; transform: none; }
	.pmg-actor.idle { filter: brightness(.45) saturate(.6) drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); transform: scale(.96); }
	.pmg-actor .pmg-portrait { width: 100%; height: auto; aspect-ratio: 5 / 6; }
	.pmg-actor .plate { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); }

	.pmg-dbox { position: relative; width: min(980px, 100%); min-height: 150px; padding: 26px 30px 30px; border-radius: 4px; z-index: 3;
		background: linear-gradient(180deg, rgba(10, 18, 38, .9), rgba(3, 6, 14, .95)); border: 1px solid var(--line); border-top: 1px solid rgba(243, 215, 138, .45);
		box-shadow: 0 24px 60px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .05); backdrop-filter: blur(10px); animation: pmg-boxin .55s var(--ease-out) both; }
	.pmg-dbox::before, .pmg-dbox::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--gold); }
	.pmg-dbox::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
	.pmg-dbox::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
	.pmg-dbox .who { position: absolute; top: -17px; left: 24px; display: flex; align-items: baseline; gap: 10px; padding: 6px 16px; background: linear-gradient(180deg, #1a2950, #0b1428); border: 1px solid var(--gold); border-radius: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); animation: pmg-platein .45s var(--ease-out) both; }
	.pmg-dbox .who b { font-family: var(--serif); font-size: 14px; letter-spacing: .1em; color: var(--gold-2); white-space: nowrap; }
	.pmg-dbox .who span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.pmg-dbox.pinkbox { border-color: rgba(231, 143, 179, .45); border-top-color: rgba(255, 195, 218, .55); }
	.pmg-dbox.pinkbox .who { border-color: var(--pink); }
	.pmg-dbox.pinkbox .who b { color: var(--pink-2); }
	.pmg-dbox.pinkbox::before, .pmg-dbox.pinkbox::after { border-color: var(--pink); }
	.pmg-text { font-family: var(--story); font-size: clamp(18px, 2.2cqi, 22px); line-height: 1.6; color: #eef0f6; min-height: 3.2em; white-space: pre-wrap; }
	.pmg-text.narr { font-style: italic; color: #d6dbe7; }
	.pmg-text.dlg::before { content: "\201C"; color: var(--gold); margin-right: 2px; }
	.pmg-text.dlg.done::after { content: "\201D"; color: var(--gold); margin-left: 2px; }
	.pmg-cursor { display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -0.16em; background: var(--gold-2); animation: pmg-blink .9s steps(1) infinite; box-shadow: 0 0 8px var(--gold); }
	.pmg-next { position: absolute; right: 18px; bottom: 10px; display: flex; gap: 8px; align-items: center; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); opacity: 0; transition: opacity .3s; }
	.pmg-next.on { opacity: 1; }
	.pmg-next i { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--gold); animation: pmg-bob 1s ease-in-out infinite; }
	.pmg-vn-meta { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 3; white-space: nowrap; }
	.pmg-vn-meta .loc { font-family: var(--serif); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-2); padding: 6px 14px; background: rgba(2, 4, 10, .6); border: 1px solid var(--line); backdrop-filter: blur(6px); }
	.pmg-vn-title { position: absolute; top: 50px; left: 0; right: 0; text-align: center; padding: 0 20px; z-index: 2; pointer-events: none; }
	.pmg-vn-title .pmg-h2 { font-family: var(--serif); font-size: clamp(22px, 3.6cqi, 36px); letter-spacing: .08em; text-shadow: 0 4px 24px rgba(0, 0, 0, .9); animation: pmg-fadein 1s var(--ease) both; }
	.pmg-skip { position: absolute; top: 12px; right: 14px; z-index: 4; }
	.pmg-log-btn { position: absolute; top: 12px; left: 14px; z-index: 4; }

	/* Choices */
	.pmg-choices { width: min(860px, 100%); display: grid; gap: 9px; margin-bottom: 14px; z-index: 4; cursor: default; }
	.pmg-choice { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 4px 14px; align-items: center; padding: 13px 20px 13px 14px; text-align: left; border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
		background: linear-gradient(90deg, rgba(10, 18, 38, .94), rgba(4, 8, 18, .9)); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
		opacity: 0; transform: translateY(18px); animation: pmg-choicein .55s var(--ease-out) forwards; transition: border-color .25s, background .25s, transform .25s var(--ease), opacity .4s; }
	.pmg-choice::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(212, 175, 55, .22), transparent 60%); transform: translateX(-101%); transition: transform .45s var(--ease-out); }
	.pmg-choice:hover, .pmg-choice:focus-visible { border-color: var(--gold); transform: translateX(4px); }
	.pmg-choice:hover::before, .pmg-choice:focus-visible::before { transform: none; }
	.pmg-choice .lt { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--gold-2); border: 1px solid var(--gold); transform: rotate(45deg); position: relative; }
	.pmg-choice .lt span { transform: rotate(-45deg); }
	.pmg-choice .cl { font-weight: 700; font-size: 15.5px; position: relative; color: var(--ink); }
	.pmg-choice .cd { font-size: 13px; color: var(--ink-2); position: relative; }
	.pmg-choice .hints { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; position: relative; }
	.pmg-choice.chosen { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2), 0 0 40px rgba(212, 175, 55, .35); transform: scale(1.02); }
	.pmg-choice.chosen::before { transform: none; background: linear-gradient(90deg, rgba(212, 175, 55, .35), rgba(212, 175, 55, .05)); }
	.pmg-choice.gone { opacity: 0 !important; transform: translateY(14px) scale(.97) !important; pointer-events: none; }
	.pmg-choices.pinkset .pmg-choice { border-color: rgba(231, 143, 179, .35); }
	.pmg-choices.pinkset .pmg-choice .lt { border-color: var(--pink); color: var(--pink-2); }
	.pmg-choices.pinkset .pmg-choice:hover { border-color: var(--pink); }
	.pmg-choices.pinkset .pmg-choice::before { background: linear-gradient(90deg, rgba(231, 143, 179, .22), transparent 60%); }

	/* Chapter title card */
	.pmg-titlecard { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; z-index: 3; }
	.pmg-titlecard .num { font-family: var(--serif); font-size: 12px; letter-spacing: .6em; color: var(--gold); text-transform: uppercase; opacity: 0; animation: pmg-fadein 1.2s .2s forwards; }
	.pmg-titlecard .pmg-h1 { font-family: var(--serif); font-size: clamp(36px, 7.2cqi, 78px); line-height: 1.05; letter-spacing: .06em; margin: 16px 0 12px; opacity: 0; filter: blur(12px); animation: pmg-titlein 1.8s .5s var(--ease-out) forwards; }
	.pmg-titlecard .lines { display: flex; align-items: center; gap: 16px; opacity: 0; animation: pmg-fadein 1s 1.4s forwards; }
	.pmg-titlecard .lines i { height: 1px; width: 0; background: linear-gradient(90deg, transparent, var(--gold)); animation: pmg-grow 1.4s 1.4s var(--ease-out) forwards; }
	.pmg-titlecard .lines i:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
	.pmg-titlecard .subt { font-family: var(--story); font-style: italic; font-size: clamp(16px, 2.2cqi, 22px); color: var(--ink-2); }
	.pmg-titlecard .where { margin-top: 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); min-height: 1.4em; }
	.pmg-titlecard .tap { margin-top: 36px; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); opacity: 0; animation: pmg-fadein 1s 3s forwards, pmg-pulse 2.4s 4s infinite; }

	/* Breaking-news lower third */
	.pmg-lower { position: absolute; left: 0; right: 0; top: 22%; display: grid; justify-items: start; padding: 0 clamp(14px, 6cqi, 80px); z-index: 4; pointer-events: none; }
	.pmg-lower .slab { display: inline-flex; gap: 10px; align-items: center; padding: 8px 18px; background: var(--red); color: #fff; font: 800 13px var(--sans); letter-spacing: .28em; animation: pmg-slideR .5s var(--ease-out) both; box-shadow: 0 10px 30px rgba(214, 58, 58, .45); }
	.pmg-lower .slab i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pmg-blink 1s steps(1) infinite; }
	.pmg-lower .bar { margin-top: 2px; max-width: min(900px, 100%); padding: 14px 22px; background: linear-gradient(90deg, #f6f2e9, #e8e1d1); color: #111; font: 700 clamp(17px, 2.4cqi, 24px)/1.3 var(--sans); clip-path: inset(0 100% 0 0); animation: pmg-wipe .8s .35s var(--ease-out) forwards; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
	.pmg-lower .src { margin-top: 2px; padding: 5px 14px; background: #0b1428; color: var(--gold-2); font: 600 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: 0; animation: pmg-fadein .5s 1s forwards; }

	/* Emergency alert */
	.pmg-emergency { position: absolute; left: 0; right: 0; top: 30%; z-index: 4; text-align: center; pointer-events: none; }
	.pmg-emergency .band { padding: 18px 20px; background: repeating-linear-gradient(-45deg, rgba(214, 58, 58, .92) 0 26px, rgba(140, 20, 20, .92) 26px 52px); color: #fff; font: 800 clamp(18px, 3cqi, 30px) var(--serif); letter-spacing: .3em; text-transform: uppercase; box-shadow: 0 0 80px rgba(214, 58, 58, .6); animation: pmg-bandin .6s var(--ease-out) both, pmg-pulse 1s .6s 3; }
	.pmg-emergency .t { margin-top: 12px; font-family: var(--mono); color: #ffd3d3; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; }

	/* Documents */
	.pmg-docwrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px 12px 16px; z-index: 5; overflow-y: auto; cursor: default; }
	.pmg-docwrap.dim { background: rgba(2, 4, 10, .55); backdrop-filter: blur(3px); }
	.pmg-doc { position: relative; width: min(640px, 100%); padding: 36px clamp(20px, 5cqi, 48px) 30px; color: var(--paper-ink); font-family: var(--story); font-size: 16.5px; line-height: 1.55; border-radius: 2px;
		background: radial-gradient(120% 80% at 30% 10%, rgba(255, 255, 255, .55), transparent 60%), repeating-linear-gradient(0deg, rgba(120, 90, 40, .035) 0 2px, transparent 2px 4px), linear-gradient(180deg, var(--paper), var(--paper-2));
		box-shadow: 0 30px 80px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .2), inset 0 0 60px rgba(120, 90, 40, .25); animation: pmg-docin .8s var(--ease-out) both; transform-origin: 50% 100%; }
	.pmg-doc::before { content: ""; position: absolute; inset: 9px; border: 3px double rgba(160, 30, 30, .7); pointer-events: none; }
	.pmg-doc .wm { position: absolute; inset: 0; display: grid; place-items: center; opacity: .07; pointer-events: none; }
	.pmg-doc .wm svg { width: 55%; }
	.pmg-doc .lh { text-align: center; font-family: var(--serif); letter-spacing: .22em; text-transform: uppercase; font-size: 11px; color: #5a4520; }
	.pmg-doc .lh b { display: block; font-size: 16px; letter-spacing: .18em; color: #2a1d08; margin-top: 4px; }
	.pmg-doc .meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: #5a4a30; border-top: 2px solid #3a2a10; border-bottom: 1px solid #3a2a10; padding: 6px 0; margin: 14px 0 16px; }
	.pmg-doc .subj { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: .04em; margin-bottom: 10px; color: #1f1607; }
	.pmg-doc .body { font-family: var(--mono); font-size: 14px; line-height: 1.65; white-space: pre-wrap; min-height: 2em; }
	.pmg-doc .body.serif { font-family: var(--story); font-size: 17px; }
	.pmg-doc .sec { margin-top: 14px; }
	.pmg-doc .sec .h { font-family: var(--serif); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #6b5020; border-bottom: 1px dotted rgba(90, 60, 20, .5); padding-bottom: 3px; margin-bottom: 6px; }
	.pmg-doc table.fx { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13px; }
	.pmg-doc table.fx td { padding: 3px 0; border-bottom: 1px dotted rgba(90, 60, 20, .25); }
	.pmg-doc table.fx td:last-child { text-align: right; font-weight: 700; }
	.pmg-doc .up { color: #1f6b33; } .pmg-doc .down { color: #9c1f1f; }
	.pmg-doc .sigrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
	.pmg-doc .sig { width: 250px; max-width: 100%; }
	.pmg-doc .sig svg { width: 100%; height: 64px; }
	.pmg-doc .sig .ln { border-top: 1px solid #3a2a10; font-family: var(--serif); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #5a4520; padding-top: 4px; }
	.pmg-doc .sig text { font-family: var(--script); font-size: 34px; fill: transparent; stroke: #1b2d6b; stroke-width: .9; stroke-dasharray: 900; stroke-dashoffset: 900; }
	.pmg-doc .sig.signed text { animation: pmg-sign 1.6s ease-in-out forwards; }
	.pmg-doc .sig.instant text { stroke-dashoffset: 0; fill: #1b2d6b; }
	.pmg-doc .acts { display: flex; gap: 10px; flex-wrap: wrap; }
	.pmg-doc .acts .pmg-btn.ghost { color: #3a2a10; background: transparent; border-color: rgba(58, 42, 16, .45); }
	.pmg-doc .acts .pmg-btn.ghost:hover { background: rgba(58, 42, 16, .08); }
	.pmg-stampmark { position: absolute; right: 7%; bottom: 13%; padding: 8px 18px; border: 4px solid currentColor; border-radius: 6px; font: 900 clamp(28px, 6cqi, 46px) var(--serif); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-14deg); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
	.pmg-stampmark::after { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 3px; }
	.pmg-stampmark.ok { color: #1d6b38; } .pmg-stampmark.no { color: #b01e1e; } .pmg-stampmark.ts { color: #b01e1e; font-size: clamp(20px, 4cqi, 30px); }
	.pmg-stampmark.on { animation: pmg-stamp .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
	.pmg-doc.shake { animation: pmg-shake .35s; }
	.pmg-doc .tapmore { text-align: center; margin-top: 14px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #7a6540; }
	.pmg-doc.memo { background: linear-gradient(180deg, #fbf6e6, #efe5c9); }
	.pmg-doc.cable { background: linear-gradient(180deg, #e9eef3, #d4dde6); --paper-ink: #182433; }
	.pmg-doc.cable .lh, .pmg-doc.cable .meta { color: #2c3e55; }

	/* Deltas board */
	.pmg-deltas { width: min(860px, 100%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; z-index: 4; }
	.pmg-deltas .pmg-chip { font-size: 13px; padding: 6px 14px; backdrop-filter: blur(6px); background-color: rgba(4, 8, 18, .75); opacity: 0; animation: pmg-pop .55s var(--ease-out) forwards; }
	.pmg-hidden-note { width: min(860px, 100%); text-align: center; margin-bottom: 10px; font-family: var(--story); font-style: italic; color: #a9cbff; font-size: 16px; z-index: 4; animation: pmg-fadein 1s both; }

	/* Election counting */
	.pmg-count { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; z-index: 5; text-align: center; background: radial-gradient(70% 60% at 50% 45%, rgba(10, 18, 38, .86), rgba(2, 4, 10, .95)); cursor: default; }
	.pmg-count .round { font-family: var(--mono); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
	.pmg-count .tally { display: flex; gap: clamp(20px, 6cqi, 70px); align-items: flex-end; justify-content: center; }
	.pmg-count .side b { display: block; font-family: var(--serif); font-size: clamp(38px, 8cqi, 76px); line-height: 1; font-variant-numeric: tabular-nums; }
	.pmg-count .side span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
	.pmg-count .side.gov b { color: #f0a43a; } .pmg-count .side.opp b { color: #5aa2ff; }
	.pmg-count .verdict { font-family: var(--serif); font-size: clamp(22px, 4.6cqi, 44px); letter-spacing: .1em; opacity: 0; transition: opacity 1s, transform 1s var(--ease-out); transform: translateY(10px); }
	.pmg-count .verdict.on { opacity: 1; transform: none; }
	.pmg-count .verdict.win { color: var(--gold-2); text-shadow: 0 0 30px rgba(212, 175, 55, .6); }
	.pmg-count .verdict.lose { color: var(--red-2); text-shadow: 0 0 30px rgba(214, 58, 58, .6); }
	.pmg-count .pmg-hemi { width: min(520px, 90cqi); }
	.pmg-votebar { display: flex; height: 10px; width: min(520px, 90cqi); border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .06); }
	.pmg-votebar i { display: block; height: 100%; transition: width 2s var(--ease); width: 0; }

	/* ==================================================================
	 * Activity scenes
	 * ================================================================ */
	.pmg-act { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 12px clamp(12px, 3cqi, 34px) 18px; animation: pmg-actin .6s var(--ease-out) both; scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
	.pmg-act-head { text-align: center; margin: 4px 0 14px; }
	.pmg-act-head .pmg-h2 { font-family: var(--serif); font-size: clamp(22px, 3.4cqi, 34px); letter-spacing: .1em; text-shadow: 0 4px 22px rgba(0, 0, 0, .85); }
	.pmg-act-head .s { font-family: var(--story); font-style: italic; color: var(--ink-2); font-size: 17px; }
	.pmg-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 18px; align-items: start; max-width: 1180px; margin: 0 auto; }

	/* Conversation panel (shared by cabinet, parliament, foreign, residence) */
	.pmg-talk { position: relative; padding: 20px 20px 18px; border-radius: 4px; background: linear-gradient(180deg, rgba(10, 18, 38, .92), rgba(3, 6, 14, .95)); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); backdrop-filter: blur(10px); animation: pmg-boxin .5s var(--ease-out) both; cursor: default; }
	.pmg-talk.pinkbox { border-color: rgba(231, 143, 179, .45); }
	.pmg-talk .head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
	.pmg-talk .head .pmg-portrait { width: 84px; height: 96px; flex: none; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); background: var(--navy-900); }
	.pmg-talk .head b { display: block; font-family: var(--serif); font-size: 16px; letter-spacing: .08em; color: var(--gold-2); }
	.pmg-talk.pinkbox .head b { color: var(--pink-2); }
	.pmg-talk .head span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
	.pmg-talk .line { font-family: var(--story); font-size: 18.5px; line-height: 1.55; min-height: 2.6em; white-space: pre-wrap; }
	.pmg-talk .line.narr { font-style: italic; color: var(--ink-2); }
	.pmg-talk .reply { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); font-family: var(--story); font-style: italic; font-size: 17.5px; color: #dfe4ef; white-space: pre-wrap; }
	.pmg-talk .pmg-choices { width: 100%; margin: 14px 0 0; }
	.pmg-talk .pmg-choice { padding: 10px 14px 10px 10px; grid-template-columns: 30px 1fr; }
	.pmg-talk .pmg-choice .lt { width: 26px; height: 26px; font-size: 12px; }
	.pmg-talk .pmg-choice .cl { font-size: 14px; }
	.pmg-talk .pmg-choice .cost { position: absolute; right: 12px; top: 10px; font-size: 10.5px; letter-spacing: .14em; color: var(--gold); }
	.pmg-talk .pmg-choice[disabled] { opacity: .38 !important; cursor: not-allowed; transform: none !important; }
	.pmg-talk .meters { display: grid; gap: 6px; margin: 6px 0 4px; }
	.pmg-talk .close { position: absolute; right: 10px; top: 10px; }
	.pmg-meter { display: grid; grid-template-columns: 92px 1fr 34px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--ink-2); }
	.pmg-meter .t { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
	.pmg-meter .t i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-2)); transition: width 1s var(--ease); }
	.pmg-meter .t i.bad { background: linear-gradient(90deg, #8e1f1f, var(--bad)); }
	.pmg-meter .t i.pink { background: linear-gradient(90deg, #a5436c, var(--pink-2)); }
	.pmg-meter b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

	/* Cabinet table */
	.pmg-table-wrap { position: relative; width: 100%; aspect-ratio: 1 / .92; max-height: 640px; container-type: inline-size; }
	.pmg-table-oval { position: absolute; left: 18%; right: 18%; top: 26%; bottom: 26%; border-radius: 50%; background: radial-gradient(60% 60% at 50% 40%, #6b4423, #3a2212 70%, #24150a); box-shadow: 0 30px 60px rgba(0, 0, 0, .7), inset 0 0 0 6px #2a180b, inset 0 0 0 8px rgba(212, 175, 55, .35), inset 0 10px 40px rgba(255, 220, 150, .15); display: grid; place-items: center; }
	.pmg-table-oval .em { width: 22%; opacity: .55; }
	.pmg-seat { position: absolute; width: clamp(54px, 15cqi, 104px); transform: translate(-50%, -50%); text-align: center; transition: transform .3s var(--ease); z-index: 1; }
	.pmg-seat:hover, .pmg-seat.on { transform: translate(-50%, -50%) scale(1.07); z-index: 2; }
	.pmg-seat .pmg-portrait { width: 100%; aspect-ratio: 5 / 6; height: auto; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, #1a2747, #0a1222); box-shadow: 0 10px 24px rgba(0, 0, 0, .6); }
	.pmg-seat.on .pmg-portrait { border-color: var(--gold-2); box-shadow: 0 0 0 2px var(--gold), 0 10px 30px rgba(212, 175, 55, .35); }
	.pmg-seat .pf { display: block; margin-top: 4px; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
	.pmg-seat .nm { display: block; font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.pmg-seat.vacant .pmg-portrait { display: grid; place-items: center; border-style: dashed; border-color: rgba(255, 100, 100, .55); color: var(--red-2); font: 700 10px var(--serif); letter-spacing: .2em; background: rgba(214, 58, 58, .07); }
	.pmg-seat .flag { position: absolute; top: -6px; right: -6px; }
	.pmg-pool { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
	.pmg-pool button { flex: 0 0 auto; width: 104px; text-align: center; }
	.pmg-pool .pmg-portrait { width: 100%; aspect-ratio: 5 / 6; height: auto; border-radius: 4px; border: 1px solid var(--line-2); overflow: hidden; background: #0d1830; }
	.pmg-pool button:hover .pmg-portrait { border-color: var(--gold); }
	.pmg-pool span { display: block; font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.pmg-pool small { display: block; font-size: 10px; color: var(--ink-3); }

	/* Parliament */
	.pmg-house { position: relative; max-width: 760px; margin: 0 auto; }
	.pmg-hemi { width: 100%; }
	.pmg-hemi circle { transition: fill .4s; }
	.pmg-house .tot { text-align: center; margin-top: -6px; font-family: var(--serif); letter-spacing: .1em; }
	.pmg-house .tot b { font-size: 28px; }
	.pmg-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 8px 0 4px; font-size: 12px; color: var(--ink-2); }
	.pmg-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

	/* Intelligence light-table */
	.pmg-lighttable { position: relative; max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 26px 22px; justify-content: center; padding: 22px 10px 30px; border-radius: 6px; background: radial-gradient(70% 70% at 50% 40%, rgba(47, 224, 182, .12), transparent 70%), rgba(2, 10, 12, .55); border: 1px solid rgba(47, 224, 182, .18); }
	.pmg-folder { position: relative; width: 190px; height: 132px; padding: 22px 14px 12px; text-align: left; color: #3b2b10; background: linear-gradient(180deg, #d9b979, #c39c55); border-radius: 2px 8px 4px 4px; box-shadow: 0 14px 30px rgba(0, 0, 0, .6); transition: transform .35s var(--ease); font-family: var(--mono); font-size: 12px; }
	.pmg-folder::before { content: ""; position: absolute; top: -12px; left: 0; width: 72px; height: 14px; background: #d9b979; border-radius: 6px 6px 0 0; }
	.pmg-folder:hover { transform: translateY(-6px) rotate(0deg) !important; }
	.pmg-folder b { display: block; font-family: var(--serif); font-size: 13px; line-height: 1.25; color: #2a1d08; margin-top: 8px; max-height: 3.8em; overflow: hidden; }
	.pmg-folder .st { position: absolute; top: 10px; right: 10px; font: 800 9px var(--serif); letter-spacing: .14em; color: #a01818; border: 2px solid #a01818; padding: 1px 5px; transform: rotate(6deg); }
	.pmg-folder.new { box-shadow: 0 0 0 2px var(--red), 0 0 30px rgba(214, 58, 58, .5), 0 14px 30px rgba(0, 0, 0, .6); }

	/* Newsroom */
	.pmg-tv { position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 8.2; border-radius: 14px; padding: 14px; background: linear-gradient(180deg, #1a1a20, #0a0a0e); box-shadow: 0 30px 70px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(255, 255, 255, .06); }
	.pmg-tv .scr { position: relative; height: 100%; border-radius: 6px; overflow: hidden; background: radial-gradient(80% 90% at 30% 30%, #16264a, #050912); }
	.pmg-tv .scr::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px); pointer-events: none; }
	.pmg-tv .anchor { position: absolute; left: 4%; bottom: 0; width: 34%; }
	.pmg-tv .logo { position: absolute; right: 3%; top: 5%; font: 900 14px var(--sans); letter-spacing: .14em; color: #fff; background: var(--red); padding: 4px 10px; }
	.pmg-tv .live { position: absolute; right: 3%; top: 15%; font: 700 10px var(--sans); letter-spacing: .2em; color: #fff; display: flex; gap: 6px; align-items: center; }
	.pmg-tv .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red-2); animation: pmg-blink 1s steps(1) infinite; }
	.pmg-tv .l3 { position: absolute; left: 0; right: 0; bottom: 9%; }
	.pmg-tv .l3 .k { display: inline-block; padding: 5px 12px; background: var(--red); color: #fff; font: 800 11px var(--sans); letter-spacing: .24em; }
	.pmg-tv .l3 .h { padding: 10px 16px; background: rgba(246, 242, 233, .97); color: #111; font: 700 clamp(14px, 2.2cqi, 21px) var(--sans); animation: pmg-wipe .7s var(--ease-out) both; }
	.pmg-tv .crawl { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; display: flex; align-items: center; background: #0b1428; color: var(--gold-2); font: 600 12px var(--sans); white-space: nowrap; overflow: hidden; }
	.pmg-tv .crawl span { display: inline-block; padding-left: 100%; animation: pmg-marquee 60s linear infinite; }
	.pmg-paper { max-width: 900px; margin: 18px auto 0; padding: 22px clamp(16px, 3cqi, 30px); color: #1d1a14; background: linear-gradient(180deg, #f3efe4, #e6dfcd); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); border-radius: 2px; }
	.pmg-paper .mast { text-align: center; font: 900 clamp(24px, 4.4cqi, 40px) var(--story); letter-spacing: .04em; border-bottom: 3px double #1d1a14; padding-bottom: 6px; }
	.pmg-paper .ed { display: flex; justify-content: space-between; font: 600 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid #1d1a14; padding: 4px 0; margin-bottom: 12px; }
	.pmg-paper .cols { columns: 2 260px; column-gap: 26px; column-rule: 1px solid rgba(0, 0, 0, .2); }
	.pmg-paper .it { break-inside: avoid; margin-bottom: 12px; font-family: var(--story); }
	.pmg-paper .it b { display: block; font-size: 17px; line-height: 1.25; }
	.pmg-paper .it small { font: 600 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6b6151; }
	.pmg-paper .it:first-child b { font-size: 24px; }
	.pmg-tabs { display: flex; justify-content: center; gap: 6px; margin: 16px 0 0; }
	.pmg-tabs button { padding: 7px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; color: var(--ink-2); background: rgba(2, 4, 10, .5); text-transform: capitalize; }
	.pmg-tabs button.on { border-color: var(--gold); color: var(--gold-2); }

	/* Foreign affairs map */
	.pmg-map { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 560px; }
	.pmg-map svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
	.pmg-map svg.lines line { stroke-width: 1.6; stroke-dasharray: 5 6; animation: pmg-dash 2s linear infinite; }
	.pmg-node { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; text-align: center; transition: transform .3s var(--ease); }
	.pmg-node:hover, .pmg-node.on { transform: translate(-50%, -50%) scale(1.08); }
	.pmg-node .orb { width: clamp(38px, 5.2cqi, 56px); height: clamp(38px, 5.2cqi, 56px); border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font: 700 12px var(--serif); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), rgba(0, 0, 0, .55)); box-shadow: 0 0 22px currentColor; }
	.pmg-node .nm { font-size: 11px; color: var(--ink); text-shadow: 0 2px 8px #000; max-width: 120px; line-height: 1.2; }
	.pmg-node .rv { font: 700 11px var(--sans); }
	.pmg-node.home .orb { width: clamp(60px, 8cqi, 86px); height: clamp(60px, 8cqi, 86px); color: var(--gold); border-width: 3px; }

	/* Policy desk */
	.pmg-desk { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; max-width: 1180px; margin: 0 auto; align-items: start; }
	.pmg-files { display: grid; gap: 6px; max-height: 100%; }
	.pmg-file { position: relative; display: grid; gap: 2px; text-align: left; padding: 10px 12px 10px 16px; border-radius: 2px 6px 6px 2px; background: linear-gradient(90deg, rgba(243, 234, 211, .95), rgba(228, 214, 180, .92)); color: var(--paper-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .45); transition: transform .25s var(--ease); }
	.pmg-file::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--gold)); }
	.pmg-file:hover, .pmg-file.on { transform: translateX(8px); }
	.pmg-file.on { box-shadow: 0 0 0 2px var(--gold), 0 10px 24px rgba(0, 0, 0, .5); }
	.pmg-file b { font-family: var(--serif); font-size: 13px; letter-spacing: .02em; line-height: 1.25; }
	.pmg-file small { font: 600 9.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #6b5020; }
	.pmg-file .st { position: absolute; right: 8px; top: 8px; font: 800 9px var(--serif); letter-spacing: .12em; padding: 1px 5px; border: 2px solid; transform: rotate(5deg); }
	.pmg-file .st.ok { color: #1d6b38; } .pmg-file .st.no { color: #a01818; }
	.pmg-desk .pmg-docwrap { position: relative; inset: auto; padding: 0; display: block; overflow: visible; }
	.pmg-desk .pmg-doc { margin: 0 auto; }

	/* Residence */
	.pmg-family { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 2cqi, 26px); min-height: 230px; flex-wrap: wrap; }
	.pmg-member { width: clamp(110px, 15cqi, 170px); text-align: center; transition: transform .35s var(--ease); }
	.pmg-member:hover, .pmg-member.on { transform: translateY(-6px); }
	.pmg-member .pmg-portrait { width: 100%; aspect-ratio: 5 / 6; height: auto; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .7)); }
	.pmg-member.on .pmg-portrait { filter: drop-shadow(0 0 18px rgba(231, 143, 179, .6)) drop-shadow(0 16px 30px rgba(0, 0, 0, .7)); }
	.pmg-member b { display: block; font-family: var(--serif); font-size: 13px; letter-spacing: .06em; color: var(--pink-2); }
	.pmg-member small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
	.pmg-member .heart { display: block; margin-top: 4px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
	.pmg-member .heart i { display: block; height: 100%; background: linear-gradient(90deg, #a5436c, var(--pink-2)); }
	.pmg-member.child .pmg-portrait { width: 82%; margin: 0 auto; }

	/* Estate brochure */
	.pmg-brochure { display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; max-width: 1180px; margin: 0 auto; }
	.pmg-lot { flex: 0 0 230px; scroll-snap-align: start; text-align: left; border-radius: 3px; overflow: hidden; background: linear-gradient(180deg, #0f1a33, #070d1c); border: 1px solid var(--line-2); transition: transform .3s var(--ease), border-color .3s; }
	.pmg-lot:hover, .pmg-lot.on { transform: translateY(-4px); border-color: var(--gold); }
	.pmg-lot .art { height: 120px; display: grid; place-items: center; background: radial-gradient(80% 90% at 50% 20%, rgba(212, 175, 55, .22), transparent 70%), #0a1324; }
	.pmg-lot .art svg { width: 70%; }
	.pmg-lot .tx { padding: 10px 12px 12px; display: grid; gap: 3px; }
	.pmg-lot b { font-family: var(--serif); font-size: 13.5px; letter-spacing: .03em; }
	.pmg-lot small { color: var(--ink-3); font-size: 11px; }
	.pmg-lot .pr { font-family: var(--serif); color: var(--gold-2); font-size: 15px; }
	.pmg-lot.owned { border-color: rgba(231, 143, 179, .4); }

	/* Records ledger */
	.pmg-ledger { max-width: 900px; margin: 0 auto; display: grid; gap: 16px; }
	.pmg-timeline { position: relative; padding-left: 22px; }
	.pmg-timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: linear-gradient(180deg, var(--gold), transparent); }
	.pmg-timeline .ev { position: relative; padding: 6px 0 10px; }
	.pmg-timeline .ev::before { content: ""; position: absolute; left: -20px; top: 12px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 8px var(--gold); }
	.pmg-timeline small { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
	.pmg-timeline b { display: block; font-family: var(--serif); letter-spacing: .03em; }
	.pmg-timeline span { font-family: var(--story); font-style: italic; color: var(--ink-2); font-size: 16px; }
	.pmg-box { padding: 18px 20px; border-radius: 4px; background: linear-gradient(180deg, rgba(10, 18, 38, .88), rgba(3, 6, 14, .92)); border: 1px solid var(--line); backdrop-filter: blur(8px); }
	.pmg-box .pmg-h3 { font-family: var(--serif); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 10px; }
	.pmg-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
	.pmg-slots { display: grid; gap: 8px; }
	.pmg-slot { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 3px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); flex-wrap: wrap; text-align: left; }
	.pmg-slot.on { border-color: var(--gold); background: rgba(212, 175, 55, .07); }
	.pmg-slot .sn { font-family: var(--serif); font-size: 22px; color: var(--gold); width: 30px; text-align: center; }
	.pmg-slot .info { flex: 1; min-width: 170px; }
	.pmg-slot .info b { display: block; font-family: var(--serif); letter-spacing: .03em; }
	.pmg-slot .info span { font-size: 12.5px; color: var(--ink-2); }
	.pmg-endgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
	.pmg-endtile { padding: 12px; border-radius: 3px; border: 1px dashed var(--line-2); color: var(--ink-3); font-family: var(--serif); letter-spacing: .04em; min-height: 62px; display: grid; align-content: center; font-size: 13px; }
	.pmg-endtile.got { border-style: solid; border-color: var(--gold); color: var(--gold-2); background: rgba(212, 175, 55, .06); }
	.pmg-endtile.got.defeat { border-color: rgba(214, 58, 58, .6); color: #ffb3b3; background: rgba(214, 58, 58, .06); }
	.pmg-empty { padding: 26px; text-align: center; color: var(--ink-3); font-family: var(--story); font-style: italic; font-size: 17px; }

	/* Ending */
	.pmg-ending { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(24px, 6cqi, 70px) 18px 40px; z-index: 5; background: radial-gradient(70% 60% at 50% 30%, rgba(10, 18, 38, .65), rgba(2, 4, 10, .96)); cursor: default; }
	.pmg-ending > *, .pmg-count > *, .pmg-titlecard > *, .pmg-act > * { flex-shrink: 0; min-height: auto; }
	.pmg-ending .pmg-h1 { font-family: var(--serif); font-size: clamp(30px, 6cqi, 64px); letter-spacing: .05em; line-height: 1.1; margin: 16px 0; opacity: 0; filter: blur(10px); animation: pmg-titlein 2s .4s var(--ease-out) forwards; max-width: 900px; }
	.pmg-ending.defeat .pmg-h1 { color: #ffc0c0; }
	.pmg-ending .prose { max-width: 720px; font-family: var(--story); font-size: clamp(17px, 2.1cqi, 21px); line-height: 1.7; color: #e2e6ef; text-align: left; white-space: pre-wrap; min-height: 4em; }
	.pmg-ending .epi { font-style: italic; color: var(--ink-2); margin-top: 16px; }
	.pmg-ending .score { margin-top: 26px; display: grid; gap: 2px; padding: 14px 36px; border: 1px solid var(--gold); opacity: 0; transition: opacity 1s; }
	.pmg-ending .score.on { opacity: 1; }
	.pmg-ending .score b { font-family: var(--serif); font-size: 40px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
	.pmg-ending .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; width: min(720px, 100%); margin-top: 22px; }

	/* Modal & toasts */
	.pmg-modal-wrap { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 10, .78); backdrop-filter: blur(4px); animation: pmg-fadein .25s ease both; }
	.pmg-modal { width: min(660px, 100%); max-height: 88%; overflow: auto; padding: 24px; border-radius: 4px; background: linear-gradient(180deg, rgba(14, 24, 48, .97), rgba(4, 8, 18, .98)); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: pmg-boxin .4s var(--ease-out) both; cursor: default; user-select: text; }
	.pmg-modal .pmg-h3 { font-family: var(--serif); font-size: 20px; letter-spacing: .1em; color: var(--gold-2); margin-bottom: 12px; }
	.pmg-modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
	.pmg-help { display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
	.pmg-help b { color: var(--ink); }
	.pmg-kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; font: 600 11px var(--mono); color: var(--gold-2); }
	.pmg-toasts { position: absolute; z-index: 60; right: 14px; top: calc(var(--hud-h) + 8px); display: grid; gap: 8px; width: min(380px, calc(100% - 28px)); pointer-events: none; }
	.pmg-toast { pointer-events: auto; padding: 12px 15px; border-radius: 3px; background: rgba(8, 14, 30, .97); border: 1px solid var(--line); border-left: 3px solid var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); font-size: 13.5px; animation: pmg-toastin .45s var(--ease-out) both; }
	.pmg-toast.err { border-left-color: var(--red); }
	.pmg-toast .pmg-deltas { width: auto; justify-content: flex-start; margin: 8px 0 0; }
	.pmg-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 88%); z-index: 40; padding: 14px; overflow-y: auto; background: linear-gradient(180deg, rgba(8, 14, 30, .98), rgba(2, 4, 10, .98)); border-left: 1px solid var(--line); box-shadow: -30px 0 60px rgba(0, 0, 0, .6); transform: translateX(105%); transition: transform .45s var(--ease-out); }
	.pmg-drawer.on { transform: none; }
	.pmg-drawer .pmg-rail { display: block; width: auto; padding: 0; opacity: 1; transform: none; }

	/* ---------- Responsive ---------- */
	@container pmg (max-width: 1100px) {
		.pmg-main > .pmg-rail { display: none; }
		.pmg-hud .pmg-hs.opt { display: none; }
	}
	@container pmg (min-width: 1101px) { .pmg-hud .rail-toggle-mobile { display: none; } }
	@container pmg (max-width: 860px) {
		.pmg-split, .pmg-desk { grid-template-columns: minmax(0, 1fr); }
		.pmg-actor { width: clamp(130px, 34cqi, 200px); bottom: 150px; }
		.pmg-actor.l { left: 0; } .pmg-actor.r { right: 0; }
		.pmg-dbox { padding: 22px 18px 26px; min-height: 130px; }
		.pmg-files { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: none; padding-bottom: 6px; }
		.pmg-file:hover, .pmg-file.on { transform: translateY(-4px); }
		.pmg-hud-pm .txt { display: none; }
		.pmg-hs { padding: 3px 7px; }
		.pmg-hs .k { font-size: 8.5px; letter-spacing: .12em; }
		.pmg-hs .v { font-size: 13px; }
		.pmg-hud { gap: 8px; padding: 0 8px; }
		.pmg-ap { display: none; }
		.pmg-table-wrap { aspect-ratio: 1 / 1.02; max-height: none; }
		.pmg-table-oval { left: 24%; right: 24%; top: 16%; bottom: 16%; }
		.pmg-map { aspect-ratio: 1 / 1.15; max-height: none; }
		.pmg-dock button { padding: 7px 8px; font-size: 9px; letter-spacing: .06em; }
		.pmg-lower { top: 14%; }
	}
	@container pmg (max-width: 520px) {
		.pmg-hud .pmg-hs.mob-hide, .pmg-hud .pmg-hide-xs { display: none; }
		.pmg-text { font-size: 17.5px; }
		.pmg-hs { padding: 2px 6px; }
		.pmg-hs .k { font-size: 7.5px; letter-spacing: .06em; }
		.pmg-hs.date .k { display: none; }
		.pmg-vn-meta { display: none; }
		.pmg-vn-title { top: 54px; }
		.pmg-vn-title .pmg-h2 { font-size: 19px; }
		.pmg-dbox .who { max-width: calc(100% - 36px); }
		.pmg-dbox .who span { display: none; }
		.pmg-choice { padding: 11px 12px 11px 10px; grid-template-columns: 30px 1fr; gap: 3px 10px; }
		.pmg-choice .lt { width: 26px; height: 26px; font-size: 12px; }
		.pmg-choice .cl { font-size: 14.5px; }
		.pmg-actor { width: 42cqi; bottom: 168px; }
		.pmg-seat .nm { font-size: 9.5px; }
		.pmg-dock { justify-content: space-between; padding: 0 4px env(safe-area-inset-bottom); }
		.pmg-dock button { flex: 1 1 0; min-width: 0; padding: 8px 0; }
		.pmg-dock button span { display: none; }
		.pmg-dock button svg { width: 20px; height: 20px; }
	}
	@container pmg (max-height: 640px) {
		.pmg-actor { display: none; }
	}

	@media (prefers-reduced-motion: reduce) {
		*, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	}
	&.pmg-reduced *, &.pmg-reduced *::before, &.pmg-reduced *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
	/* ---- Accounts, policies & credits (v1.2) ------------------------------ */
	.pmg-title.gated { place-items: start center; align-content: start; }
	.pmg-title.gated .pmg-brandfoot { position: static; margin-top: 28px; padding-bottom: 6px; }
	.pmg-title-wrap { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 5cqi, 72px); width: 100%; max-width: 1180px; margin: auto; flex-wrap: wrap; }
	.pmg-title.gated .pmg-title-inner { flex: 1 1 360px; max-width: 520px; }
	.pmg-title.gated .pmg-h1 { font-size: clamp(38px, 6.4cqi, 76px); }
	.pmg-camp { max-width: 560px; font-family: var(--story); font-style: italic; font-size: 17px; }
	.pmg-free { display: inline-block; margin-top: 8px; font-family: var(--serif); font-style: normal; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line); padding: 5px 12px; border-radius: 99px; }
	.pmg-auth-host { flex: 0 1 440px; width: min(440px, 100%); }
	.pmg-paper { position: relative; color: #241a0a; font-family: var(--story); border-radius: 2px;
		background: radial-gradient(120% 80% at 30% 10%, rgba(255, 255, 255, .6), transparent 60%), repeating-linear-gradient(0deg, rgba(120, 90, 40, .03) 0 2px, transparent 2px 4px), linear-gradient(180deg, #f6eed9, #e9dcbc);
		box-shadow: 0 30px 80px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .25), inset 0 0 50px rgba(120, 90, 40, .22); }
	.pmg-paper::before { content: ""; position: absolute; inset: 9px; border: 3px double rgba(160, 30, 30, .75); pointer-events: none; }
	.pmg-authcard { padding: 34px clamp(20px, 4cqi, 36px) 26px; text-align: left; animation: pmg-docin .8s var(--ease-out) both; user-select: text; }
	.pmg-authcard.shake { animation: pmg-shake .35s; }
	.pmg-seal { position: absolute; top: 14px; right: 14px; width: 74px; height: 74px; color: rgba(160, 30, 30, .55); transform: rotate(-12deg); pointer-events: none; }
	.pmg-akicker { font-family: var(--serif); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: #8a2020; margin-right: 70px; }
	.pmg-ah { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: .06em; color: #1f1607; margin: 8px 70px 6px 0; }
	.pmg-asub { margin: 0 0 14px; font-size: 16px; line-height: 1.45; color: #4b3b1d; }
	.pmg-aerr { display: none; margin: 0 0 12px; padding: 9px 12px; border-left: 3px solid #b3261e; background: rgba(179, 38, 30, .09); color: #8a1c16; font: 600 14px/1.4 system-ui, sans-serif; }
	.pmg-aerr.on { display: block; }
	.pmg-aform { display: grid; gap: 12px; }
	.pmg-afield { display: grid; gap: 4px; position: relative; }
	.pmg-afield > span { font: 700 10.5px var(--serif); letter-spacing: .18em; text-transform: uppercase; color: #5a4520; }
	.pmg-afield .lock { font-style: normal; letter-spacing: .04em; text-transform: none; color: #8a2020; margin-left: 6px; font-family: system-ui, sans-serif; font-weight: 600; }
	.pmg-afield .pre { position: absolute; left: 0; bottom: 9px; font: 600 16px system-ui, sans-serif; color: #5a4520; font-style: normal; }
	.pmg-afield .pre + .pmg-ainput { padding-left: 40px; }
	.pmg-ainput { all: unset; box-sizing: border-box; width: 100%; padding: 8px 2px; border-bottom: 1.5px solid rgba(90, 69, 32, .45); font: 17px system-ui, -apple-system, "Segoe UI", sans-serif; color: #1b1407; user-select: text; -webkit-user-select: text; cursor: text; }
	.pmg-ainput:focus { border-color: #1b2d6b; background: rgba(27, 45, 107, .04); }
	.pmg-ainput[readonly] { color: #6b5a3a; border-bottom-style: dashed; cursor: not-allowed; }
	.pmg-ainput::placeholder { color: rgba(90, 69, 32, .5); }
	.pmg-otp { font: 700 28px "Courier New", monospace; letter-spacing: .5em; text-align: center; color: #1b2d6b; padding-left: .5em; }
	.pmg-ahint { margin: -6px 0 0; font: 12.5px/1.4 system-ui, sans-serif; color: #6b5a3a; }
	.pmg-acheck { display: flex; gap: 9px; align-items: flex-start; font: 13.5px/1.45 system-ui, sans-serif; color: #3a2c12; cursor: pointer; }
	.pmg-acheck input { accent-color: #8a2020; width: 17px; height: 17px; margin: 1px 0 0; flex: none; }
	.pmg-arow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font: 13.5px system-ui, sans-serif; }
	.pmg-authcard a, .pmg-acheck a, .pmg-alink { color: #1b2d6b; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
	.pmg-alink { all: unset; color: #1b2d6b; text-decoration: underline; cursor: pointer; font: 13.5px system-ui, sans-serif; }
	.pmg-alink:disabled { color: #8b7d60; text-decoration: none; cursor: default; }
	.pmg-aform .pmg-btn.lg { width: 100%; margin-top: 4px; padding: 14px 20px; }
	.pmg-btn.loading { opacity: .65; pointer-events: none; }
	.pmg-aswitch { margin: 14px 0 0; text-align: center; font: 14px system-ui, sans-serif; color: #4b3b1d; }
	.pmg-gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border-radius: 4px; background: #fff; color: #1f1f1f !important; text-decoration: none !important; font: 600 15px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; border: 1px solid #c9c2b0; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
	.pmg-gbtn:hover { background: #f8f8f8; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
	.pmg-or { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; font: 12px system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8b7d60; }
	.pmg-or::before, .pmg-or::after { content: ""; flex: 1; height: 1px; background: rgba(90, 69, 32, .3); }
	.pmg-who { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
	.pmg-who a, .pmg-brandfoot a { color: var(--gold-2); text-decoration: none; cursor: pointer; }
	.pmg-who a:hover, .pmg-brandfoot a:hover { text-decoration: underline; }
	.pmg-brandfoot { position: static; display: flex; flex-direction: column; gap: 4px; letter-spacing: .06em; z-index: 3; margin-top: 22px; align-self: end; }
	.pmg-title:has(.pmg-brandfoot) { grid-template-rows: minmax(min-content, 1fr) auto; }
	.pmg-title > .pmg-title-wrap, .pmg-title > .pmg-brandfoot, .pmg-auth-host, .pmg-authcard { min-height: auto; flex-shrink: 0; }
	.pmg-brandfoot b { color: var(--gold-2); font-weight: 600; }
	.pmg-acct .pmg-aform { color: var(--ink); }
	.pmg-acct .pmg-afield > span, .pmg-acct .pmg-afield .pre { color: var(--ink-3); }
	.pmg-acct .pmg-ainput { color: var(--ink); border-color: var(--line); }
	.pmg-acct .pmg-ainput:focus { border-color: var(--gold-2); background: rgba(212, 175, 55, .05); }
	.pmg-acct .pmg-ainput[readonly] { color: var(--ink-3); }
	.pmg-acct .pmg-acheck { color: var(--ink-2, #c9cfdb); }
	.pmg-acct .pmg-afield .lock { color: #ff9a94; }
	.pmg-acct .pmg-aerr { background: rgba(214, 58, 58, .14); color: #ffb3ad; }
	.pmg-acct .pmg-alink { color: var(--gold-2); }
	.pmg-acct .pmg-alink:disabled { color: var(--ink-3); }
	.pmg-acct .pmg-otp { color: var(--gold-2); }
	.pmg-credit-pill { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; margin-right: 6px; border-radius: 99px; border: 1px solid var(--line); background: rgba(212, 175, 55, .08); color: var(--gold-2); font: 600 11px var(--serif); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
	.pmg-credit-pill:hover { border-color: var(--gold); background: rgba(212, 175, 55, .16); }
	.pmg-credit-pill svg { width: 15px; height: 15px; }
	.pmg-soon { margin-left: 8px; padding: 2px 7px; border-radius: 99px; font-size: 9px; letter-spacing: .12em; background: rgba(212, 175, 55, .16); color: var(--gold-2); }
	.pmg-credits { display: flex; gap: 18px; align-items: center; margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(212, 175, 55, .06); flex-wrap: wrap; }
	.pmg-credits > div { display: grid; gap: 2px; }
	.pmg-credits > div b { font: 700 28px var(--serif); color: var(--gold-2); }
	.pmg-credits p b { color: var(--gold-2); font-weight: 700; }
	.pmg-credits p { flex: 1 1 220px; margin: 0; font-size: 13.5px; color: var(--ink-3); }
	.pmg-danger { padding: 14px 16px; border: 1px solid rgba(214, 58, 58, .4); border-radius: 4px; background: rgba(214, 58, 58, .07); }
	.pmg-danger b { color: #ff9a94; font-family: var(--serif); letter-spacing: .08em; }
	.pmg-danger p { margin: 6px 0 10px; font-size: 13.5px; color: var(--ink-3); }
	.pmg-modal:has(.pmg-policydoc) { width: min(820px, 100%); padding: 18px; background: rgba(4, 8, 18, .96); }
	.pmg-policydoc { padding: 34px clamp(18px, 4cqi, 44px) 26px; font-size: 16px; line-height: 1.6; }
	.pmg-policydoc .pmg-ah { margin-right: 80px; font-size: 26px; }
	.pmg-policy h3, .pmg-policy .pmg-ph { all: unset; display: block; font: 700 15px var(--serif); letter-spacing: .08em; color: #6a1414; margin: 18px 0 6px; }
	.pmg-policy p, .pmg-policy li { margin: 0 0 8px; color: #2a2010; }
	.pmg-policy ul { margin: 0 0 10px; padding-left: 22px; list-style: disc; }
	.pmg-policy li { display: list-item; list-style: disc outside; }
	.pmg-policy a { color: #1b2d6b; }
	.pmg-policy-meta { font: 12px system-ui, sans-serif; color: #6b5a3a; }
	.pmg-locked { display: grid; place-items: center; padding: 24px; min-height: 100%; }
	.pmg-locked .pmg-doc { text-align: center; padding-top: 44px; }
	.pmg-locked .pmg-doc::before { display: none; }
	.pmg-locked .pmg-credits { justify-content: center; border-color: rgba(110, 80, 30, .35); background: rgba(110, 80, 30, .06); }
	.pmg-locked .pmg-credits > div b { color: #6a1414; }
	.pmg-locked .pmg-akicker, .pmg-locked .pmg-ah { margin-right: 0; }
	.pmg-locked .pmg-chip { color: #6a1414; border-color: rgba(110, 30, 30, .4); }
	.pmg-locked .pmg-btn.ghost { color: #3a2a10; background: transparent; border-color: rgba(58, 42, 16, .45); backdrop-filter: none; }
	.pmg-locked a { color: #6a1414; }
	.pmg-locked .pmg-akicker { margin-top: 14px; }
	@container pmg (max-width: 860px) {
		.pmg-credit-pill span { display: none; }
		.pmg-credit-pill { padding: 0 9px; margin-right: 2px; }
		.pmg-title.gated { padding: 18px 14px; }
		.pmg-title-wrap { flex-direction: column; gap: 14px; }
		.pmg-title.gated .pmg-title-inner { flex: none; gap: 6px; }
		.pmg-title.gated .pmg-deva, .pmg-title.gated .pmg-rule { display: none; }
		.pmg-auth-host { flex: none; }
		.pmg-seal { width: 58px; height: 58px; }
	}

	/* ---- Avatar menu & dashboard ---- */
	.pmg-avbtn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border-radius: 99px; padding: 2px; border: 1px solid var(--line); background: rgba(4, 8, 18, .6); color: var(--gold-2); margin-left: 4px; flex: none; }
	.pmg-avbtn:hover, .pmg-avbtn[aria-expanded="true"] { border-color: var(--gold); }
	.pmg-avbtn.big { padding: 3px 12px 3px 3px; backdrop-filter: blur(6px); }
	.pmg-avbtn .nm { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px system-ui, sans-serif; color: var(--ink); }
	.pmg-avbtn .car { font-size: 11px; opacity: .7; }
	.pmg-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #f3d78a, #a8851f); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
	.pmg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
	.pmg-avatar b { font: 700 12px var(--serif); color: #1b1405; letter-spacing: .04em; }
	.pmg-avatar.lg { width: 42px; height: 42px; } .pmg-avatar.lg b { font-size: 15px; }
	.pmg-avatar.xl { width: 58px; height: 58px; } .pmg-avatar.xl b { font-size: 20px; }
	.pmg-title-user { position: absolute; top: 14px; right: 14px; z-index: 6; max-width: calc(100% - 28px); }
	.pmg-udrop-host { position: absolute; top: 0; right: 0; z-index: 60; }
	.pmg-udrop { position: absolute; top: 58px; right: 12px; width: min(270px, calc(100cqi - 24px)); padding: 6px; border-radius: 8px; background: linear-gradient(180deg, rgba(14, 24, 48, .98), rgba(4, 8, 18, .99)); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .65); animation: pmg-boxin .22s var(--ease-out) both; display: grid; }
	.pmg-udrop .hd { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
	.pmg-udrop .hd > div { min-width: 0; display: grid; }
	.pmg-udrop .hd b { color: var(--gold-2); font: 600 14px system-ui, sans-serif; overflow-wrap: anywhere; }
	.pmg-udrop .hd span { color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
	.pmg-udrop button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 5px; cursor: pointer; color: var(--ink); font: 14px system-ui, sans-serif; }
	.pmg-udrop button:hover, .pmg-udrop button:focus-visible { background: rgba(212, 175, 55, .12); }
	.pmg-udrop button svg { width: 17px; height: 17px; color: var(--gold-2); flex: none; }
	.pmg-udrop button em { margin-left: auto; font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); opacity: .8; }
	.pmg-udrop button.out { color: #ff9a94; } .pmg-udrop button.out svg { color: #ff9a94; }
	.pmg-dash-hd { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; min-width: 0; }
	.pmg-dash-hd .pmg-dim { font-size: 13px; overflow-wrap: anywhere; }
	.pmg-dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
	.pmg-dash-stats > div { padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: rgba(212, 175, 55, .05); display: grid; gap: 2px; }
	.pmg-dash-stats b { font: 700 22px var(--serif); color: var(--gold-2); }
	.pmg-dash-stats span { font-size: 12px; color: var(--ink-3); }
	@container pmg (max-width: 520px) { .pmg-avbtn.big .nm, .pmg-avbtn.big .car { display: none; } .pmg-avbtn.big { padding: 2px; } }

	/* ---- No horizontal scrolling, on any device (v1.2) ---- */
	.pmg-title, .pmg-wizard, .pmg-docwrap, .pmg-modal-wrap, .pmg-locked, .pmg-titlecard { grid-template-columns: minmax(0, 1fr); }
	.pmg-titlecard { place-content: center stretch; }
	.pmg-titlecard > *, .pmg-wiz, .pmg-title-wrap, .pmg-oath-lines, .pmg-oath-enter { max-width: 100%; min-width: 0; }
	.pmg-title, .pmg-wizard, .pmg-docwrap, .pmg-modal, .pmg-drawer, .pmg-act, .pmg-stage, .pmg-vn, .pmg-titlecard, .pmg-locked, .pmg-layer { overflow-x: hidden; }
	.pmg-text, .pmg-oath-lines, .pmg-dbox, .pmg-choice, .pmg-doc, .pmg-policy, .pmg-help, .pmg-namecard, .pmg-h1, .pmg-h2, .pmg-h3 { overflow-wrap: break-word; word-break: normal; }
	.pmg-oath-lines, .pmg-oath-lines * { white-space: normal !important; }
	.pmg-doc, .pmg-authcard, .pmg-modal, .pmg-wiz, .pmg-fields, .pmg-namecard, .pmg-menu { max-width: 100%; }
	.pmg-drawer { visibility: hidden; transition: transform .45s var(--ease-out), visibility 0s linear .45s; }
	.pmg-drawer.on { visibility: visible; transition: transform .45s var(--ease-out), visibility 0s; }
	/* Estate: a wrapping grid instead of a sideways carousel. */
	.pmg-brochure { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); overflow-x: visible; scroll-snap-type: none; }
	.pmg-lot { flex: none; min-width: 0; }
	@container pmg (max-width: 520px) {
		.pmg-btn { white-space: normal; text-align: center; max-width: 100%; line-height: 1.3; }
		.pmg-btn.lg { padding: 14px 20px; letter-spacing: .14em; }
		.pmg-fields { grid-template-columns: minmax(0, 1fr); }
		.pmg-namecard { gap: 12px; }
		.pmg-wiz .pmg-row, .pmg-row { flex-wrap: wrap; }
		.pmg-files { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
		.pmg-brochure { grid-template-columns: minmax(0, 1fr); }
		.pmg-seg { flex-wrap: wrap; }
		.pmg-credit-pill { width: 34px; padding: 0; justify-content: center; margin-right: 0; }
		.pmg-hs .k { letter-spacing: .08em; font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; }
		.pmg-title-user { top: 10px; right: 10px; }
		.pmg-udrop { top: 54px; right: 10px; }
	}
	@container pmg (max-width: 380px) {
		.pmg-hud .pmg-hide-xxs, .pmg-hud .pmg-credit-pill { display: none; }
		.pmg-hud .pmg-icon-btn { width: 34px; height: 34px; }
	}

}

/* ---------- Keyframes ---------- */
@keyframes pmg-spin { to { transform: rotate(360deg); } }
@keyframes pmg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pmg-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmg-titlein { from { opacity: 0; filter: blur(14px); letter-spacing: .3em; } to { opacity: 1; filter: blur(0); } }
@keyframes pmg-grow { to { width: clamp(40px, 12cqi, 140px); } }
@keyframes pmg-boxin { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pmg-platein { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes pmg-choicein { to { opacity: 1; transform: none; } }
@keyframes pmg-actin { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pmg-docin { 0% { opacity: 0; transform: translateY(60px) rotate(-3deg) scale(.96); } 100% { opacity: 1; transform: rotate(-.4deg); } }
@keyframes pmg-stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2.6); } 60% { opacity: .95; transform: rotate(-14deg) scale(.92); } 100% { opacity: .88; transform: rotate(-14deg) scale(1); } }
@keyframes pmg-sign { 0% { stroke-dashoffset: 900; fill: transparent; } 80% { stroke-dashoffset: 0; fill: transparent; } 100% { stroke-dashoffset: 0; fill: #1b2d6b; } }
@keyframes pmg-shake { 0%, 100% { transform: rotate(-.4deg); } 25% { transform: translate(-3px, 2px) rotate(-.6deg); } 75% { transform: translate(3px, -1px) rotate(-.2deg); } }
@keyframes pmg-pop { 0% { opacity: 0; transform: scale(.6) translateY(10px); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes pmg-toastin { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes pmg-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes pmg-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes pmg-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pmg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes pmg-float { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translateY(-110vh); opacity: 0; } }
@keyframes pmg-floatup { 0% { opacity: 0; transform: translate(-50%, 6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 34px); } }
@keyframes pmg-fgood { 30% { text-shadow: 0 0 18px rgba(240, 199, 94, .9); color: var(--good); } }
@keyframes pmg-fbad { 30% { text-shadow: 0 0 18px rgba(255, 107, 102, .9); color: var(--bad); } }
@keyframes pmg-slideR { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes pmg-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes pmg-bandin { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes pmg-dash { to { stroke-dashoffset: -22; } }
@keyframes pmg-sweep { to { transform: rotate(360deg); } }
@keyframes pmg-rain { to { transform: translateY(60px); } }
@keyframes pmg-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-30px); } }

/* ---------- [pm_game_dashboard] / [pm_game_leaderboard] ---------- */
.pmg-dash { all: initial; display: block; box-sizing: border-box; font: 15px/1.55 "Inter", "Segoe UI", system-ui, sans-serif; color: #e9ecf3; background: radial-gradient(120% 100% at 0 0, rgba(212, 175, 55, .12), transparent 55%), linear-gradient(180deg, #0d1830, #060b16); border: 1px solid rgba(201, 162, 39, .25); border-radius: 16px; padding: 26px; margin: 20px 0; }
.pmg-dash * { box-sizing: border-box; }
.pmg-dash .pmg-h2, .pmg-dash .pmg-h3 { all: unset; display: block; font-family: "Cinzel", "Palatino Linotype", Georgia, serif; letter-spacing: .06em; color: #f1d27a; }
.pmg-dash .pmg-h2 { font-size: 28px; margin: 4px 0; }
.pmg-dash .pmg-h3 { font-size: 16px; letter-spacing: .2em; text-transform: uppercase; margin: 22px 0 10px; color: #d4af37; }
.pmg-dash p { margin: 8px 0; }
.pmg-dash-kicker { font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: #d4af37; }
.pmg-dash-hi { color: #aab3c5; font-family: "Noto Serif Devanagari", Mangal, serif; }
.pmg-dash-note { color: #aab3c5; }
.pmg-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.pmg-dash-stat { padding: 14px; border-radius: 12px; border: 1px solid rgba(201, 162, 39, .2); background: rgba(3, 6, 13, .4); display: grid; gap: 2px; }
.pmg-dash-stat strong { font-family: "Cinzel", Georgia, serif; font-size: 24px; color: #f1d27a; }
.pmg-dash-stat span { font-size: 12px; color: #aab3c5; letter-spacing: .06em; }
.pmg-dash-slots { display: grid; gap: 8px; }
.pmg-dash-slot { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, .03); border-left: 3px solid #d4af37; }
.pmg-dash-slot span { font-size: 13px; color: #aab3c5; }
.pmg-dash-slot.pmg-empty { border-left-color: rgba(255, 255, 255, .12); opacity: .7; }
.pmg-dash-endings { display: flex; flex-wrap: wrap; gap: 8px; }
.pmg-dash-ending { padding: 8px 12px; border-radius: 999px; border: 1px dashed rgba(255, 255, 255, .15); font-size: 13px; color: #6f7a90; }
.pmg-dash-ending.pmg-got { border-style: solid; border-color: #d4af37; color: #f1d27a; }
.pmg-dash-ending.pmg-got.pmg-tone-defeat { border-color: #d63a3a; color: #ffb3b3; }
.pmg-dash-btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 700; text-decoration: none !important; color: #1a1306 !important; background: linear-gradient(180deg, #f1d27a, #d4af37); margin: 14px 8px 0 0; }
.pmg-dash-btn.pmg-ghost { color: #e9ecf3 !important; background: transparent; border: 1px solid rgba(201, 162, 39, .4); }
.pmg-board ol { list-style: none; margin: 0; padding: 0; counter-reset: pmg; }
.pmg-board li { counter-increment: pmg; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pmg-board li::before { content: counter(pmg); font-family: "Cinzel", Georgia, serif; color: #d4af37; width: 26px; }
.pmg-board li b { margin-left: auto; color: #f1d27a; font-variant-numeric: tabular-nums; }
