/* phm.css - Peacock Habitat Map UI: tokens, bar, stage, legend, lookup, cards, pins, toast, ad bar. UI track. ASCII only.
 * Illustrated light theme: paper stage, sand land, pale sea. Contrast: ink #1a3a2f on cream #fdfbf2 12.0:1; white on primary #c24f29 4.7:1; every label that sits on the map is on an
 * opaque cream or dark chip (the WebGL pixels cannot be audited). Mobile first; the stage is one viewport tall minus the bar
 * and the ad bar so article ads trigger on the first scroll. */

:root {
	--phm-bar-h: 52px;
	--phm-ad-h: 60px;
	--phm-ocean: #9bced4;
	--phm-land: #f7ecce;
	--phm-border: #3f6f74;
	--phm-paper: #f2ead6;
	--phm-shadow: rgba(74, 58, 26, 0.22);
	--phm-indian: #2a6fdb;
	--phm-green: #2f9d5c;
	--phm-congo: #8f5bc8;
	--phm-intro: #f06a3c;
	--phm-cream: #fdfbf2;
	--phm-ink: #1a3a2f;
	--phm-muted: #33544a;
	--phm-coral: #e06840;
	--phm-primary: #c24f29;
	--phm-mint: #e8f4ec;
	--phm-line: rgba(26, 58, 47, 0.12);
	--phm-focus: #6fa8e8;
	--phm-spring: cubic-bezier(0.2, 0.9, 0.25, 1.12);
	--phm-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--phm-head: "Fredoka", "Nunito Sans", system-ui, sans-serif;
}
@media (min-width: 768px) {
	:root { --phm-ad-h: 100px; }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.phm-body {
	margin: 0;
	padding-bottom: var(--phm-ad-h);
	background: var(--phm-cream);
	color: var(--phm-ink);
	font-family: var(--phm-font);
	-webkit-font-smoothing: antialiased;
}
body.phm-embed { --phm-ad-h: 0px; }
.phm-body *, .phm-body *::before, .phm-body *::after { box-sizing: border-box; }
.phm-body button { font-family: inherit; }
.phm-body :focus-visible { outline: 3px solid var(--phm-focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ bar */
.phm-bar {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--phm-bar-h);
	padding: 0 16px;
	background: var(--phm-cream);
	border-bottom: 1px solid var(--phm-line);
}
.phm-logo { flex: 0 0 auto; display: inline-flex; align-items: center; line-height: 0; }
.phm-logo img { height: 26px; width: auto; display: block; }
.phm-actions { flex: 0 0 auto; display: flex; gap: 8px; margin-left: auto; }
.phm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 36px;
	min-width: 36px;
	padding: 0 12px;
	background: #fff;
	color: var(--phm-ink);
	border: 1px solid var(--phm-line);
	border-radius: 8px;
	font: 700 14px/1 var(--phm-font);
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, opacity 0.2s;
}
.phm-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(26, 58, 47, 0.16); }
.phm-btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.phm-btn:disabled { opacity: 0.55; cursor: default; }
.phm-btn[data-action="download"] { background: var(--phm-primary); border-color: var(--phm-primary); color: #fff; }
.phm-icon { flex: 0 0 auto; }
.phm-btn .phm-icon { transition: transform 0.55s var(--phm-spring); }
.phm-btn.is-spin .phm-icon { transform: rotate(360deg) scale(1.1); }

/* ------------------------------------------------------------------ stage */
.phm-stage {
	position: relative;
	height: calc(100vh - var(--phm-bar-h) - var(--phm-ad-h));
	height: calc(100svh - var(--phm-bar-h) - var(--phm-ad-h));
	min-height: 360px;
	overflow: hidden;
	isolation: isolate;
	background: radial-gradient(ellipse at 50% 45%, #f8f2e2 0%, #e9dec1 80%);
	color: var(--phm-ink);
}
.phm-embed .phm-stage { height: 100vh; height: 100svh; }
.phm-poster {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.9s ease;
}
.phm-stage.is-ready .phm-poster { opacity: 0; pointer-events: none; }
.phm-canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	display: block;
	touch-action: none; /* the stage owns one-finger drags; the guide link and the bar stay scrollable */
	outline: none;
	cursor: grab;
}
.phm-canvas:active { cursor: grabbing; }
.phm-canvas:focus-visible { outline: 3px solid var(--phm-focus); outline-offset: -3px; }
.phm-stage.is-hover .phm-canvas { cursor: pointer; }
.phm-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }

/* ------------------------------------------------------------------ legend */
.phm-legend {
	position: absolute;
	left: 16px;
	bottom: 16px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: calc(100% - 32px);
}
.phm-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 15px 0 12px;
	border-radius: 999px;
	background: var(--phm-cream);
	color: var(--phm-ink);
	border: 1px solid var(--phm-line);
	font: 700 13.5px/1 var(--phm-font);
	cursor: pointer;
	box-shadow: 0 3px 10px var(--phm-shadow);
	transition: transform 0.18s var(--phm-spring), box-shadow 0.18s, background-color 0.2s, opacity 0.25s;
}
.phm-chip-img {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin-left: -7px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--phm-land);
	box-shadow: 0 0 0 2.5px var(--phm-chip);
	transition: filter 0.2s, opacity 0.2s;
}
.phm-chip.is-off .phm-chip-img { filter: grayscale(1); opacity: 0.6; }
.phm-chip:disabled { cursor: default; }
.phm-chip:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px var(--phm-shadow); }
.phm-chip:active:not(:disabled) { transform: scale(0.97); }
.phm-dot {
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: var(--phm-chip);
	box-shadow: 0 0 0 1.5px var(--phm-ink);
	transition: background-color 0.2s, box-shadow 0.2s;
}
.phm-chip.is-off { background: rgba(253, 251, 242, 0.84); opacity: 0.8; }
.phm-chip.is-off .phm-dot { background: transparent; }
.phm-chip.is-off .phm-chip-label { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.phm-chip.is-sel { box-shadow: 0 0 0 3px var(--phm-chip), 0 8px 20px var(--phm-shadow); }
.phm-chip-introduced .phm-dot { border-radius: 50%; }
.phm-js .phm-legend .phm-chip { opacity: 0; transform: translateY(14px); }
.phm-stage.is-live .phm-legend .phm-chip { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s; }
.phm-stage.is-live .phm-legend .phm-chip.is-off { opacity: 0.8; }
.phm-nojs-chips .phm-chip { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ title panel + lookup */
.phm-hero {
	position: absolute;
	left: 16px;
	top: 16px;
	z-index: 9;
	width: min(404px, calc(100% - 32px));
	padding: 14px 12px 12px 16px;
	background: var(--phm-cream);
	border-radius: 16px;
	box-shadow: 0 8px 26px var(--phm-shadow);
	transition: opacity 0.25s;
}
.phm-hero-head { display: flex; align-items: center; gap: 12px; }
.phm-hero-birds { flex: 0 0 auto; display: flex; padding-left: 2px; }
.phm-hero-bird {
	display: block;
	width: 46px;
	height: 46px;
	margin-left: -14px;
	border-radius: 50%;
	background: var(--phm-land);
	box-shadow: 0 0 0 3px var(--phm-cream), 0 0 0 5.5px var(--phm-chip);
	overflow: hidden;
}
.phm-hero-bird:first-child { margin-left: 0; }
.phm-hero-bird:nth-child(1) { z-index: 3; position: relative; }
.phm-hero-bird:nth-child(2) { z-index: 2; position: relative; }
.phm-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phm-hero-txt { min-width: 0; padding-left: 4px; }
.phm-title { margin: 0; font: 600 24px/1.05 var(--phm-head); color: var(--phm-ink); letter-spacing: -0.005em; }
.phm-hero-sub { margin: 4px 0 0; font: 700 13.5px/1.3 var(--phm-font); color: var(--phm-muted); }
.phm-lookup {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "label label" "input go";
	gap: 5px 8px;
	margin-top: 12px;
	padding-top: 11px;
	border-top: 1px dashed rgba(26, 58, 47, 0.22);
}
.phm-lookup-label { grid-area: label; font: 600 14px/1.2 var(--phm-head); color: var(--phm-ink); padding-right: 4px; }
.phm-lookup-input {
	grid-area: input;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	font: 600 16px/1 var(--phm-font);
	color: var(--phm-ink);
	background: #fff;
	border: 1px solid rgba(26, 58, 47, 0.28);
	border-radius: 8px;
}
.phm-lookup-input::placeholder { color: #5b7068; font-weight: 600; }
.phm-lookup-go {
	grid-area: go;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--phm-primary);
	color: #fff;
	font: 700 14px/1 var(--phm-font);
	cursor: pointer;
	transition: transform 0.16s, box-shadow 0.16s;
}
.phm-lookup-go:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(194, 79, 41, 0.4); }
.phm-sugg {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--phm-cream);
	border-radius: 12px;
	box-shadow: 0 14px 36px var(--phm-shadow);
	max-height: 280px;
	overflow: auto;
}
.phm-sugg[hidden] { display: none; }
.phm-sugg li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	font: 700 15px/1.2 var(--phm-font);
	color: var(--phm-ink);
	cursor: pointer;
}
.phm-sugg li small { font: 600 12px/1 var(--phm-font); color: var(--phm-muted); }
.phm-sugg li[aria-selected="true"], .phm-sugg li:hover { background: var(--phm-mint); }

/* ------------------------------------------------------------------ card */
.phm-card {
	position: absolute;
	right: 16px;
	top: 16px;
	z-index: 8;
	width: 362px;
	max-height: calc(100% - 32px);
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--phm-cream);
	color: var(--phm-ink);
	border-radius: 14px;
	box-shadow: 0 18px 54px rgba(74, 58, 26, 0.32);
	opacity: 0;
	visibility: hidden;
	transform: translateX(34px) scale(0.97);
	transform-origin: 100% 0;
	transition: transform 0.46s var(--phm-spring), opacity 0.26s ease, visibility 0s linear 0.46s;
}
.phm-card.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.phm-card.is-drag { transition: none; }
.phm-card-grab { display: none; }
.phm-card-in { padding: 18px 18px 16px; }
.phm-card-x {
	position: absolute;
	right: 10px;
	top: 10px;
	z-index: 5;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid var(--phm-line);
	border-radius: 50%;
	background: #fff;
	color: var(--phm-ink);
	cursor: pointer;
	transition: transform 0.16s, background-color 0.16s;
}
.phm-card-x:hover { transform: rotate(90deg); background: var(--phm-mint); }
.phm-card-hero { display: flex; gap: 14px; align-items: center; padding-right: 36px; }
.phm-card-img {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	border-radius: 12px;
	background: var(--phm-mint);
	object-fit: cover;
}
.phm-card-img[hidden] { display: none; }
.phm-card-title { margin: 0; font: 600 22px/1.15 var(--phm-head); color: var(--phm-ink); }
.phm-card-title:focus { outline: none; }
.phm-card-sub { margin: 3px 0 8px; font: italic 600 14px/1.3 var(--phm-font); color: var(--phm-muted); }
.phm-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font: 800 12px/1.2 var(--phm-font);
	letter-spacing: 0.01em;
}
.phm-pill-LC { background: #d3eedb; color: #14532d; }
.phm-pill-NT { background: #e6efbd; color: #3b4d10; }
.phm-pill-VU { background: #fde3a8; color: #6d4200; }
.phm-pill-EN { background: #fbcdbd; color: #86280d; }
.phm-pill-CR { background: #f7b5b5; color: #720f0f; }
.phm-card-note { margin: 14px 0 0; font: 600 14.5px/1.5 var(--phm-font); color: var(--phm-ink); }
.phm-card-h { margin: 16px 0 6px; font: 800 11.5px/1 var(--phm-font); letter-spacing: 0.09em; text-transform: uppercase; color: var(--phm-muted); }
.phm-card-list { margin: 0; font: 600 14px/1.5 var(--phm-font); color: var(--phm-ink); }
.phm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.phm-chips li, .phm-chips button {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--phm-mint);
	color: var(--phm-ink);
	border: 1px solid transparent;
	font: 700 12.5px/1.3 var(--phm-font);
}
.phm-chips button { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: transform 0.15s, border-color 0.15s; }
.phm-chips button:hover { transform: translateY(-1px); border-color: var(--phm-ink); }
.phm-chips .phm-dot { width: 10px; height: 10px; }
.phm-card-acts { display: flex; gap: 8px; margin-top: 16px; }
.phm-card-btn {
	flex: 1 1 auto;
	height: 40px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid var(--phm-line);
	background: #fff;
	color: var(--phm-ink);
	font: 700 14px/1 var(--phm-font);
	cursor: pointer;
	transition: transform 0.16s, box-shadow 0.16s;
}
.phm-card-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(26, 58, 47, 0.16); }
.phm-card-btn.is-primary { background: var(--phm-primary); border-color: var(--phm-primary); color: #fff; }
.phm-card-src { display: inline-block; margin-top: 10px; font: 700 12.5px/1.3 var(--phm-font); color: #0f6a92; }

.phm-answer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 14px 0 0;
	padding: 12px 14px;
	border-radius: 12px;
	font: 600 24px/1.1 var(--phm-head);
}
.phm-answer svg { flex: 0 0 auto; }
.phm-answer small { display: block; margin-top: 3px; font: 700 12.5px/1.2 var(--phm-font); opacity: 0.9; }
.phm-answer-native { background: #d3eedb; color: #14532d; }
.phm-answer-extirpated { background: #fde3a8; color: #6d4200; }
.phm-answer-introduced { background: #ffdfd0; color: #86300f; }
.phm-answer-none { background: #e4e9e6; color: #2a3d36; }
.phm-card-where { margin: 12px 0 0; font: 800 12px/1.2 var(--phm-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--phm-muted); }

/* ------------------------------------------------------------------ pins, tooltip, ripple, toast */
.phm-pin { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity 0.3s; }
.phm-pin.is-off { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s linear 0.2s; }
.phm-pin-dot {
	position: absolute;
	left: -8px;
	top: -8px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--phm-intro);
	border: 2.5px solid #fff;
	box-shadow: 0 1px 5px rgba(74, 58, 26, 0.45);
}
.phm-pin-dot::before {
	content: "";
	position: absolute;
	inset: -7px;
	border-radius: 50%;
	border: 2px solid var(--phm-intro);
	opacity: 0;
	animation: phm-ring 2.3s ease-out infinite;
	animation-delay: var(--d, 0s);
}
.phm-pin.is-sel .phm-pin-dot { transform: scale(1.35); background: #fff; border-color: var(--phm-intro); }
.phm-pin-label {
	position: absolute;
	left: 13px;
	top: -12px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--phm-cream);
	color: var(--phm-ink);
	border: 1px solid var(--phm-line);
	font: 700 12px/1.3 var(--phm-font);
	white-space: nowrap;
	box-shadow: 0 2px 8px var(--phm-shadow);
}
.phm-pin.is-bare .phm-pin-label { display: none; }
.phm-flag { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.phm-flag.is-off { display: none; }
.phm-flag span {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -50%);
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--phm-ink);
	color: var(--phm-cream);
	border: 1.5px solid var(--phm-cream);
	font: 600 14px/1.2 var(--phm-head);
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
@keyframes phm-ring {
	0% { transform: scale(0.55); opacity: 0.85; }
	80%, 100% { transform: scale(1.9); opacity: 0; }
}
.phm-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 7;
	pointer-events: none;
	padding: 6px 11px;
	border-radius: 8px;
	background: var(--phm-cream);
	color: var(--phm-ink);
	font: 700 13px/1.25 var(--phm-font);
	box-shadow: 0 6px 18px var(--phm-shadow);
	white-space: nowrap;
	opacity: 0;
	transition: opacity 0.14s;
}
.phm-tip.is-on { opacity: 1; }
.phm-tip i { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--phm-ink); }
.phm-ripple {
	position: absolute;
	z-index: 3;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border-radius: 50%;
	border: 2px solid rgba(26, 58, 47, 0.7);
	pointer-events: none;
	animation: phm-rip 0.75s ease-out forwards;
}
@keyframes phm-rip {
	from { transform: scale(0.4); opacity: 0.95; }
	to { transform: scale(4.2); opacity: 0; }
}
.phm-toast {
	position: absolute;
	left: 50%;
	bottom: 72px;
	z-index: 12;
	max-width: calc(100% - 32px);
	padding: 11px 18px;
	border-radius: 999px;
	background: var(--phm-ink);
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	font: 700 14px/1.2 var(--phm-font);
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, 16px);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.35s var(--phm-spring), opacity 0.25s;
}
.phm-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------------------------ scroll hint */
.phm-scrollhint {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 15px;
	border-radius: 999px;
	background: #0a2230;
	color: #e8f4ec;
	border: 1px solid rgba(232, 244, 236, 0.35);
	font: 700 13px/1 var(--phm-font);
	text-decoration: none;
	transition: transform 0.18s, background-color 0.18s;
}
.phm-scrollhint:hover { background: #12384c; transform: translateY(-2px); }
.phm-scrollhint .phm-icon { animation: phm-bounce 1.8s ease-in-out infinite; }
@keyframes phm-bounce {
	0%, 100% { transform: translateY(-2px); }
	50% { transform: translateY(3px); }
}
.phm-embed .phm-scrollhint { display: none; }
.phm-stage.has-card .phm-scrollhint { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ ad bar */
.phm-adbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	height: var(--phm-ad-h);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--phm-cream);
	border-top: 1px solid var(--phm-line);
	overflow: hidden;
}
.phm-adbar-label { position: absolute; left: 8px; top: 3px; font: 700 10px/1 var(--phm-font); letter-spacing: 0.04em; color: var(--phm-muted); text-transform: uppercase; }
.phm-adbar-unit { display: inline-block; width: 320px; height: 50px; }
@media (min-width: 768px) {
	.phm-adbar-unit { width: 728px; height: 90px; }
}

/* ------------------------------------------------------------------ footer */
.phm-footer { background: var(--phm-mint); border-top: 1px solid var(--phm-line); color: var(--phm-ink); }
.phm-footer-in { max-width: 720px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; font: 600 14px/1.4 var(--phm-font); }
.phm-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.phm-footer a { color: #0f6a92; text-decoration: none; font-weight: 700; }
.phm-footer a:hover { text-decoration: underline; }
.phm-footer-c { margin: 0; color: var(--phm-muted); }

/* ------------------------------------------------------------------ fallback + failure */
.phm-stage.is-nogl .phm-canvas { background: var(--phm-ocean); }
.phm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 699px) {
	.phm-bar { gap: 8px; padding: 0 12px; }
	.phm-logo img { height: 22px; }
	.phm-actions { gap: 6px; }
	.phm-btn { padding: 0; width: 38px; height: 38px; }
	.phm-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.phm-hero { left: 12px; right: 12px; top: 12px; width: auto; padding: 11px 10px 10px 13px; border-radius: 14px; }
	.phm-hero-head { gap: 10px; }
	.phm-hero-bird { width: 36px; height: 36px; margin-left: -11px; box-shadow: 0 0 0 2.5px var(--phm-cream), 0 0 0 4.5px var(--phm-chip); }
	.phm-title { font-size: 20px; }
	.phm-hero-sub { font-size: 12.5px; margin-top: 2px; }
	.phm-lookup { margin-top: 9px; padding-top: 8px; }
	.phm-lookup-label { font-size: 13.5px; }
	.phm-legend { left: 12px; right: 12px; bottom: 58px; max-width: none; gap: 6px; }
	.phm-chip { height: 36px; font-size: 13px; padding: 0 12px 0 10px; }
	.phm-scrollhint { right: auto; left: 50%; bottom: 12px; transform: translateX(-50%); }
	.phm-scrollhint:hover { transform: translateX(-50%) translateY(-2px); }
	.phm-toast { bottom: 104px; }
	.phm-card {
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		width: auto;
		max-height: 72%;
		border-radius: 18px 18px 0 0;
		transform: translateY(104%);
		transform-origin: 50% 100%;
		transition: transform 0.5s var(--phm-spring), opacity 0.26s ease, visibility 0s linear 0.5s;
	}
	.phm-card.is-open { transform: none; }
	.phm-card-grab { display: block; position: sticky; top: 0; z-index: 3; height: 26px; background: var(--phm-cream); cursor: grab; touch-action: none; }
	.phm-card-grab::after { content: ""; position: absolute; left: 50%; top: 9px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(26, 58, 47, 0.28); }
	.phm-card-in { padding-top: 4px; }
	.phm-card-x { top: 14px; }
	.phm-stage.has-card .phm-legend { opacity: 0; pointer-events: none; }
	.phm-stage.has-card .phm-hero { opacity: 0; pointer-events: none; }
	.phm-sugg { max-height: 40vh; }
}
@media (min-width: 700px) and (max-width: 1020px) {
	.phm-card { width: 330px; }
	.phm-hero { width: 340px; }
	.phm-title { font-size: 22px; }
	.phm-btn-label { display: none; }
	.phm-btn { padding: 0; width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.phm-body *, .phm-body *::before, .phm-body *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
	.phm-pin-dot::before { display: none; }
	.phm-js .phm-legend .phm-chip { opacity: 1; transform: none; }
}

.phm-body [hidden] { display: none !important; }
