/* a3d.css - Animal 3D Models UI: tokens, bar, stage, glass panels, controls, labels, sheet, toast, ad bar. UI track. ASCII only.
 * Chrome (bar, footer, ad bar) uses the habitat cream palette; everything on the stage is frosted dark glass.
 * Contrast: panel text #f3f7f2 on the glass over the darkest-to-lightest stage (#0c2326 .. #173f3a) is above 13:1,
 * muted #b9d1cc is above 8:1; pressed controls are dark ink #06201f on #e9f7f3 (15:1); the WebGL pixels cannot be
 * audited, so every label that sits on the model is on an opaque-enough dark pill (checked by tools/browser-check.js).
 * Per-animal accents arrive as --a3d-accent / --a3d-accent2 / --a3d-bg / --a3d-bg2 on body[style]. */

:root {
	--a3d-bar-h: 52px;
	--a3d-ad-h: 60px;
	--a3d-cream: #fdfbf2;
	--a3d-ink: #1a3a2f;
	--a3d-muted: #33544a;
	--a3d-mint: #e8f4ec;
	--a3d-coral: #e06840;
	--a3d-line: rgba(26, 58, 47, 0.12);
	--a3d-accent: #1f8fd6;
	--a3d-accent2: #2fb39a;
	--a3d-bg: #0c2326;
	--a3d-bg2: #173f3a;
	--a3d-glass: rgba(8, 24, 26, 0.66);
	--a3d-glass-solid: rgba(8, 24, 26, 0.94);
	--a3d-glass-line: rgba(255, 255, 255, 0.13);
	--a3d-text: #f3f7f2;
	--a3d-text2: #b9d1cc;
	--a3d-on: #e9f7f3;
	--a3d-on-ink: #06201f;
	--a3d-focus: #8fd3ff;
	--a3d-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--a3d-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--a3d-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--a3d-head: "Fredoka", "Nunito Sans", system-ui, sans-serif;
	--a3d-pad: 0px;
}
@media (min-width: 768px) {
	:root { --a3d-ad-h: 100px; }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.a3d-body {
	margin: 0;
	padding-bottom: var(--a3d-ad-h);
	background: var(--a3d-cream);
	color: var(--a3d-ink);
	font-family: var(--a3d-font);
	-webkit-font-smoothing: antialiased;
}
body.a3d-embed { --a3d-ad-h: 0px; }
.a3d-body *, .a3d-body *::before, .a3d-body *::after { box-sizing: border-box; }
.a3d-body button { font-family: inherit; }
.a3d-body :focus-visible { outline: 3px solid var(--a3d-focus); outline-offset: 2px; }
.a3d-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ bar */
.a3d-bar {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--a3d-bar-h);
	padding: 0 16px;
	background: var(--a3d-cream);
	border-bottom: 1px solid var(--a3d-line);
}
.a3d-logo { flex: 0 0 auto; display: inline-flex; align-items: center; line-height: 0; }
.a3d-logo img { max-height: 26px; width: auto; height: auto; display: block; }
@media (min-width: 768px) {
	.a3d-logo img { max-height: 32px; }
}
.a3d-crumb { font: 700 13px/1 var(--a3d-font); color: var(--a3d-muted); padding-left: 12px; border-left: 1px solid var(--a3d-line); letter-spacing: 0.02em; }
.a3d-bar-actions { margin-left: auto; display: flex; gap: 8px; }
.a3d-bar .a3d-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	height: 36px; min-width: 36px; padding: 0 12px;
	background: #fff; color: var(--a3d-ink); border: 1px solid var(--a3d-line); border-radius: 8px;
	font: 700 14px/1 var(--a3d-font); cursor: pointer;
	transition: transform 0.3s var(--a3d-spring), box-shadow 0.2s ease, opacity 0.2s;
}
.a3d-bar .a3d-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(26, 58, 47, 0.16); }
.a3d-bar .a3d-btn:active:not(:disabled) { transform: scale(0.95); box-shadow: none; }
.a3d-bar .a3d-btn:disabled { opacity: 0.55; cursor: default; }
.a3d-icon { flex: 0 0 auto; }

/* ------------------------------------------------------------------ stage */
.a3d-stage {
	position: relative;
	height: calc(100vh - var(--a3d-bar-h) - var(--a3d-ad-h));
	height: calc(100svh - var(--a3d-bar-h) - var(--a3d-ad-h));
	min-height: 440px;
	overflow: hidden;
	isolation: isolate;
	background: radial-gradient(ellipse at 50% 48%, var(--a3d-bg2) 0%, var(--a3d-bg) 82%);
	color: var(--a3d-text);
}
.a3d-embed .a3d-stage { height: 100vh; height: 100svh; }
.a3d-stage:fullscreen { height: 100%; min-height: 0; }
.a3d-poster {
	position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover;
	transition: opacity 0.9s ease, transform 1.1s var(--a3d-ease);
}
.a3d-stage.is-ready .a3d-poster { opacity: 0; transform: scale(1.04); pointer-events: none; }
.a3d-canvas {
	position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block;
	touch-action: none; outline: none; cursor: grab;
}
.a3d-canvas:active { cursor: grabbing; }
.a3d-canvas:focus-visible { outline: 3px solid var(--a3d-focus); outline-offset: -3px; }
.a3d-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.a3d-stage.is-nogl .a3d-canvas, .a3d-stage.is-nogl .a3d-labels { display: none; }

/* labels (the scene positions them inline) */
.a3d-label {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 6px 13px 6px 10px; margin: 0;
	background: rgba(8, 24, 26, 0.8); color: var(--a3d-text);
	border: 1px solid rgba(200, 240, 235, 0.38); border-radius: 999px;
	font: 700 13px/1.1 var(--a3d-font); letter-spacing: 0.005em;
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s;
}
.a3d-label-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--a3d-accent2); box-shadow: 0 0 0 3px rgba(47, 179, 154, 0.25); }
.a3d-label:hover, .a3d-label:focus-visible { background: rgba(8, 24, 26, 0.94); border-color: var(--a3d-accent2); box-shadow: 0 0 0 3px rgba(47, 179, 154, 0.3), 0 4px 14px rgba(0, 0, 0, 0.3); outline: none; }
.a3d-label:focus-visible { outline: 3px solid var(--a3d-focus); outline-offset: 2px; }
.a3d-lbl-line { stroke: #d9f3ee; stroke-width: 1.2; stroke-linecap: round; }
.a3d-lbl-anchor { fill: var(--a3d-accent2); stroke: #08181a; stroke-width: 1.2; }

.a3d-tip {
	position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none;
	padding: 5px 10px; border-radius: 8px; background: rgba(8, 24, 26, 0.92); color: var(--a3d-text);
	border: 1px solid var(--a3d-glass-line); font: 700 12.5px/1 var(--a3d-font); white-space: nowrap;
}
.a3d-tip[hidden] { display: none; }

/* ------------------------------------------------------------------ panels */
.a3d-info, .a3d-controls {
	position: absolute; z-index: 5;
	background: var(--a3d-glass); color: var(--a3d-text);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border: 1px solid var(--a3d-glass-line); border-radius: 14px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}
.a3d-info { left: 16px; top: 16px; width: 344px; max-height: calc(100% - 32px); display: flex; flex-direction: column; animation: a3d-in-l 0.75s var(--a3d-ease) both; }
.a3d-controls { right: 16px; top: 16px; width: 244px; max-height: calc(100% - 32px); overflow-y: auto; padding: 14px 14px 12px; animation: a3d-in-r 0.75s var(--a3d-ease) 0.08s both; }
.a3d-info-scroll { overflow-y: auto; padding: 18px 18px 16px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
.a3d-controls.is-off { opacity: 0.55; }
@keyframes a3d-in-l { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes a3d-in-r { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes a3d-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.a3d-info-scroll > * { animation: a3d-rise 0.6s var(--a3d-ease) both; }
.a3d-info-scroll > :nth-child(1) { animation-delay: 0.22s; }
.a3d-info-scroll > :nth-child(2) { animation-delay: 0.3s; }
.a3d-info-scroll > :nth-child(3) { animation-delay: 0.38s; }
.a3d-info-scroll > :nth-child(4) { animation-delay: 0.46s; }
.a3d-controls > * { animation: a3d-rise 0.6s var(--a3d-ease) both; }
.a3d-controls > :nth-child(1) { animation-delay: 0.3s; }
.a3d-controls > :nth-child(2) { animation-delay: 0.38s; }
.a3d-controls > :nth-child(3) { animation-delay: 0.46s; }
.a3d-controls > :nth-child(4) { animation-delay: 0.54s; }

.a3d-title { margin: 0 0 6px; font: 600 25px/1.15 var(--a3d-head); color: var(--a3d-text); letter-spacing: 0.005em; }
.a3d-lede { margin: 0 0 14px; font: 600 14.5px/1.5 var(--a3d-font); color: var(--a3d-text2); }

/* cards */
.a3d-card { position: relative; padding: 13px 14px; margin: 0 0 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.09); }
.a3d-card-view { display: block; }
.a3d-card-name { margin: 0; font: 600 18px/1.2 var(--a3d-head); color: var(--a3d-text); }
.a3d-card-latin { margin: 2px 0 8px; font: 600 14px/1.3 var(--a3d-font); color: var(--a3d-text2); }
.a3d-card-iucn { margin: 0 0 8px; font: 700 13px/1.3 var(--a3d-font); color: var(--a3d-text); }
.a3d-card-k, .a3d-next-k { font: 800 10.5px/1 var(--a3d-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--a3d-text2); margin-right: 6px; }
.a3d-card-hint { margin: 0; font: 600 13px/1.45 var(--a3d-font); color: var(--a3d-text2); }
.a3d-card-kicker { margin: 0 0 3px; font: 800 10.5px/1 var(--a3d-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--a3d-text2); }
.a3d-card-title { margin: 0 0 8px; font: 600 22px/1.15 var(--a3d-head); color: var(--a3d-text); }
.a3d-card-short { margin: 0 0 8px; font: 700 15px/1.45 var(--a3d-font); color: var(--a3d-text); }
.a3d-card-text { margin: 0 0 10px; font: 600 14px/1.55 var(--a3d-font); color: var(--a3d-text2); }
.a3d-card-text em, .a3d-card-short em { font-style: italic; }
.a3d-card-text strong { color: var(--a3d-text); }
.a3d-facts { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.a3d-facts li {
	position: relative; padding: 7px 10px 7px 26px; border-radius: 9px; background: rgba(255, 255, 255, 0.06);
	font: 600 13.5px/1.4 var(--a3d-font); color: var(--a3d-text);
	animation: a3d-rise 0.5s var(--a3d-ease) both; animation-delay: calc(var(--i, 0) * 70ms + 160ms);
}
.a3d-facts li::before { content: ""; position: absolute; left: 10px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--a3d-accent2); }
.a3d-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.a3d-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; background: none; border: 0; color: var(--a3d-text); font: 700 13.5px/1 var(--a3d-font); cursor: pointer; border-radius: 8px; transition: transform 0.3s var(--a3d-spring), color 0.2s; }
.a3d-back:hover { transform: translateX(-3px); color: #fff; }

/* parts list */
.a3d-parts { display: grid; gap: 4px; padding-top: 2px; }
.a3d-parts::before { content: attr(aria-label); display: block; margin: 0 0 3px 2px; font: 800 10.5px/1 var(--a3d-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--a3d-text2); }
#a3d-pane-parts .a3d-parts::before { content: none; }
.a3d-part, .a3d-chip, .a3d-view {
	display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 12px; margin: 0;
	background: rgba(255, 255, 255, 0.09); color: var(--a3d-text); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
	font: 700 13px/1.15 var(--a3d-font); cursor: pointer;
	transition: transform 0.35s var(--a3d-spring), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s;
}
.a3d-part[hidden] { display: none; }
.a3d-chip-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.a3d-part:hover:not(:disabled), .a3d-chip:hover:not(:disabled), .a3d-view:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.28); }
.a3d-part:active:not(:disabled), .a3d-chip:active:not(:disabled), .a3d-view:active:not(:disabled) { transform: scale(0.95); }
.a3d-part:disabled, .a3d-chip:disabled, .a3d-view:disabled { opacity: 0.5; cursor: default; }
.a3d-part.is-on { background: var(--a3d-on); color: var(--a3d-on-ink); border-color: var(--a3d-on); box-shadow: 0 0 0 3px rgba(47, 179, 154, 0.35); }
.a3d-parts .a3d-part { justify-content: space-between; width: 100%; min-height: 36px; padding: 7px 12px; text-align: left; }
.a3d-parts .a3d-part::after { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-left: 10px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); opacity: 0.55; transition: transform 0.3s var(--a3d-spring), opacity 0.2s; }
.a3d-parts .a3d-part:hover:not(:disabled) { transform: translateX(3px); }
.a3d-parts .a3d-part:hover:not(:disabled)::after, .a3d-parts .a3d-part.is-on::after { opacity: 1; }
.a3d-parts .a3d-part:active:not(:disabled) { transform: scale(0.98); }

/* controls */
.a3d-group { margin: 0 0 14px; }
.a3d-group::before { content: attr(aria-label); display: block; margin: 0 0 7px 2px; font: 800 10.5px/1 var(--a3d-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--a3d-text2); }
.a3d-variants { position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); flex-wrap: wrap; }
.a3d-variants::before { flex: 0 0 100%; margin: 4px 0 4px 6px; }
.a3d-variants .a3d-chip { position: relative; z-index: 1; flex: 1 1 0; background: transparent; border-color: transparent; padding: 6px 4px; border-radius: 9px; }
.a3d-variants .a3d-chip:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); transform: none; }
.a3d-variants .a3d-chip[aria-pressed="true"] { background: var(--a3d-on); color: var(--a3d-on-ink); }
.a3d-variants.has-ind .a3d-chip[aria-pressed="true"] { background: transparent; }
.a3d-ind {
	position: absolute; left: 0; top: 0; z-index: 0; border-radius: 9px; background: var(--a3d-on);
	box-shadow: 0 0 0 2px rgba(47, 179, 154, 0.45), 0 6px 16px rgba(0, 0, 0, 0.3);
	transition: transform 0.5s var(--a3d-spring), width 0.4s var(--a3d-spring), opacity 0.2s;
}
.a3d-views { display: flex; flex-wrap: wrap; gap: 6px; }
.a3d-views::before { flex: 0 0 100%; margin-bottom: 1px; }
.a3d-view { min-height: 32px; padding: 5px 11px; }
.a3d-view-icon { position: relative; flex: 1 1 0; min-width: 0; max-width: 48px; height: 40px; min-height: 0; padding: 0; }
.a3d-view-icon .a3d-icon { width: 22px; height: 22px; }
.a3d-view-icon .a3d-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a3d-toggles { display: grid; gap: 6px; }
.a3d-toggles::before { margin-bottom: 1px; }
.a3d-toggle {
	position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; margin: 0;
	background: rgba(255, 255, 255, 0.08); color: var(--a3d-text); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 11px;
	font: 700 13.5px/1.1 var(--a3d-font); text-align: left; cursor: pointer; overflow: hidden;
	transition: transform 0.35s var(--a3d-spring), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.a3d-toggle[hidden] { display: none; }
.a3d-toggle:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); background: rgba(255, 255, 255, 0.15); }
.a3d-toggle:active:not(:disabled) { transform: scale(0.96); }
.a3d-toggle:disabled { opacity: 0.5; cursor: default; }
.a3d-toggle::after { content: ""; margin-left: auto; width: 30px; height: 17px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); transition: background-color 0.25s; }
.a3d-toggle::before { content: ""; position: absolute; right: 25px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #fff; z-index: 1; transform: translateX(-13px); transition: transform 0.4s var(--a3d-spring), background-color 0.25s; }
.a3d-toggle[aria-pressed="true"] { background: var(--a3d-on); color: var(--a3d-on-ink); border-color: var(--a3d-on); }
.a3d-toggle[aria-pressed="true"]::after { background: var(--a3d-accent2); }
.a3d-toggle[aria-pressed="true"]::before { transform: translateX(0); }
.a3d-shake::after, .a3d-shake::before { content: none; }
.a3d-shake { justify-content: flex-start; }
/* the Fan toggle shimmers until it is switched on */
.a3d-toggle[data-a3d-toggle="fan"]:not([aria-pressed="true"]):not(:disabled) {
	background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(143, 211, 255, 0.28) 48%, rgba(47, 179, 154, 0.34) 54%, rgba(255, 255, 255, 0) 72%);
	background-size: 250% 100%; background-repeat: no-repeat;
	animation: a3d-shimmer 3.2s ease-in-out infinite;
	border-color: rgba(143, 211, 255, 0.5);
}
@keyframes a3d-shimmer { 0% { background-position: 130% 0; } 55%, 100% { background-position: -60% 0; } }
.a3d-actions { display: flex; gap: 6px; }
.a3d-actions::before { flex: 0 0 100%; }
.a3d-actions { flex-wrap: wrap; }
.a3d-controls .a3d-btn {
	flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0; margin: 0;
	background: rgba(255, 255, 255, 0.09); color: var(--a3d-text); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 11px; cursor: pointer;
	transition: transform 0.35s var(--a3d-spring), background-color 0.2s;
}
.a3d-controls .a3d-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.06); background: rgba(255, 255, 255, 0.17); }
.a3d-controls .a3d-btn:active:not(:disabled) { transform: scale(0.94); }
.a3d-controls .a3d-btn:disabled { opacity: 0.5; cursor: default; }
.a3d-controls .a3d-btn.is-busy .a3d-icon { animation: a3d-pulse 0.8s ease-in-out infinite; }
@keyframes a3d-pulse { 50% { transform: scale(1.25); opacity: 0.6; } }
.a3d-controls .a3d-btn .a3d-btn-label, .a3d-actions .a3d-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a3d-nogl-note { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font: 600 13px/1.4 var(--a3d-font); color: var(--a3d-text); }

/* ------------------------------------------------------------------ scroll hint, toast */
.a3d-scrollhint {
	position: absolute; left: 50%; bottom: 14px; z-index: 4; transform: translateX(-50%);
	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(--a3d-font); text-decoration: none;
	transition: transform 0.3s var(--a3d-spring), background-color 0.18s;
}
.a3d-scrollhint:hover { background: #12384c; transform: translateX(-50%) translateY(-2px); }
.a3d-scrollhint .a3d-icon { animation: a3d-bounce 1.8s ease-in-out infinite; }
@keyframes a3d-bounce { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.a3d-embed .a3d-scrollhint { display: none; }
.a3d-toast {
	position: absolute; left: 50%; bottom: 66px; z-index: 30; max-width: calc(100% - 32px);
	padding: 11px 18px; border-radius: 999px; background: #0a2230; color: #e8f4ec; border: 1px solid rgba(232, 244, 236, 0.3);
	font: 700 14px/1.2 var(--a3d-font); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
	transition: transform 0.4s var(--a3d-spring), opacity 0.25s;
}
.a3d-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------------------------ ad bar, footer */
.a3d-adbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--a3d-ad-h);
	display: flex; align-items: center; justify-content: center;
	background: var(--a3d-cream); border-top: 1px solid var(--a3d-line); overflow: hidden;
}
.a3d-embed .a3d-adbar { display: none; }
.a3d-adbar-label { position: absolute; left: 8px; top: 3px; font: 700 10px/1 var(--a3d-font); letter-spacing: 0.04em; color: var(--a3d-muted); text-transform: uppercase; }
.a3d-adbar-unit { display: inline-block; width: 320px; height: 50px; }
@media (min-width: 768px) {
	.a3d-adbar-unit { width: 728px; height: 90px; }
}
.a3d-footer { background: var(--a3d-mint); border-top: 1px solid var(--a3d-line); color: var(--a3d-ink); }
.a3d-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(--a3d-font); }
.a3d-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.a3d-footer a { color: #0f6a92; text-decoration: none; font-weight: 700; }
.a3d-footer a:hover { text-decoration: underline; }
.a3d-footer-c { margin: 0; color: var(--a3d-muted); }

/* ------------------------------------------------------------------ narrow desktop */
@media (min-width: 900px) and (max-width: 1099px) {
	.a3d-info { width: 300px; }
	.a3d-controls { width: 214px; }
}

/* ------------------------------------------------------------------ phones: bottom sheet + floating pills */
@media (max-width: 899.98px) {
	.a3d-bar { gap: 8px; padding: 0 12px; }
	.a3d-logo img { max-height: 24px; }
	.a3d-bar .a3d-btn { padding: 0; width: 38px; height: 38px; }
	.a3d-bar .a3d-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.a3d-stage { min-height: 380px; }
	.a3d-info, .a3d-controls { position: static; width: auto; max-height: none; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; overflow: visible; }
	.a3d-info-scroll { overflow: visible; padding: 4px 16px 18px; }
	.a3d-info-scroll > *, .a3d-controls > * { animation: none; }
	.a3d-controls { padding: 6px 16px 18px; }
	.a3d-title { font-size: 21px; }
	.a3d-lede { font-size: 13.5px; margin-bottom: 10px; }
	.a3d-scrollhint { left: auto; right: 12px; top: 10px; bottom: auto; transform: none; padding: 7px 12px; font-size: 12px; }
	.a3d-scrollhint:hover { transform: translateY(-2px); }
	.a3d-toast { bottom: calc(var(--a3d-vis, 120px) + 70px); }
	.a3d-sheet {
		position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; height: var(--a3d-vis, 120px);
		display: flex; flex-direction: column;
		background: var(--a3d-glass-solid); color: var(--a3d-text);
		-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
		border-radius: 18px 18px 0 0; border-top: 1px solid var(--a3d-glass-line);
		box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
		transition: height 0.5s var(--a3d-spring);
		animation: a3d-sheet-in 0.7s var(--a3d-ease) 0.2s both;
	}
	@keyframes a3d-sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
	.a3d-sheet.is-drag { transition: none; }
	.a3d-grip { flex: 0 0 auto; position: relative; width: 100%; height: 32px; padding: 0; margin: 0; background: none; border: 0; cursor: grab; touch-action: none; }
	.a3d-grip::before { content: ""; position: absolute; left: 50%; top: 13px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); transition: background-color 0.2s, width 0.3s var(--a3d-spring), margin-left 0.3s var(--a3d-spring); }
	.a3d-grip:hover::before { background: rgba(255, 255, 255, 0.75); width: 52px; margin-left: -26px; }
	.a3d-tabs { flex: 0 0 auto; display: flex; gap: 4px; padding: 0 12px 8px; touch-action: none; }
	.a3d-tab { flex: 1 1 0; min-height: 36px; padding: 6px 4px; background: rgba(255, 255, 255, 0.08); color: var(--a3d-text); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; font: 700 13.5px/1 var(--a3d-font); cursor: pointer; transition: background-color 0.2s, transform 0.3s var(--a3d-spring); }
	.a3d-tab[aria-selected="true"] { background: var(--a3d-on); color: var(--a3d-on-ink); border-color: var(--a3d-on); }
	.a3d-tab:active { transform: scale(0.95); }
	.a3d-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
	.a3d-sheet[data-snap="peek"] .a3d-sheet-body { overflow: hidden; }
	.a3d-pane { display: none; }
	.a3d-sheet[data-tab="info"] #a3d-pane-info, .a3d-sheet[data-tab="parts"] #a3d-pane-parts, .a3d-sheet[data-tab="controls"] #a3d-pane-controls { display: block; animation: a3d-rise 0.4s var(--a3d-ease) both; }
	#a3d-pane-parts { padding: 4px 16px 18px; }
	.a3d-pills {
		position: absolute; left: 8px; right: 8px; bottom: calc(var(--a3d-vis, 120px) + 8px); z-index: 11;
		display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 6px; pointer-events: none;
		transition: bottom 0.5s var(--a3d-spring);
	}
	.a3d-sheet.is-drag ~ .a3d-pills { transition: none; }
	.a3d-pills > * { pointer-events: auto; }
	.a3d-pills .a3d-variants { flex: 0 1 auto; padding: 2px; gap: 0; background: rgba(8, 24, 26, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
	.a3d-pills .a3d-variants::before { content: none; }
	.a3d-pills .a3d-variants .a3d-chip { flex: 0 0 auto; padding: 4px 9px; min-height: 34px; font-size: 12.5px; }
	.a3d-pills .a3d-toggle { flex: 0 0 auto; width: auto; min-height: 38px; padding: 4px 11px; gap: 6px; font-size: 12.5px; background-color: rgba(8, 24, 26, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
	.a3d-pills .a3d-toggle::before, .a3d-pills .a3d-toggle::after { content: none; }
	.a3d-pills .a3d-toggle[aria-pressed="true"] { background-color: var(--a3d-on); }
	.a3d-pills .a3d-shake { display: none; width: 38px; padding: 0; justify-content: center; }
	.a3d-pills .a3d-shake .a3d-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.a3d-pills [data-a3d-toggle="fan"][aria-pressed="true"] ~ .a3d-shake:not([hidden]) { display: inline-flex; }
	.a3d-actions { gap: 8px; }
}
@media (min-width: 900px) {
	.a3d-sheet, .a3d-pills { display: none; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
	.a3d-body *, .a3d-body *::before, .a3d-body *::after { animation-duration: 0.001ms; animation-delay: 0s; animation-iteration-count: 1; transition-duration: 0.001ms; scroll-behavior: auto; }
	.a3d-stage.is-ready .a3d-poster { transition: opacity 0.2s linear; transform: none; }
	.a3d-toggle[data-a3d-toggle="fan"]:not([aria-pressed="true"]):not(:disabled) { background-image: none; animation: none; }
	.a3d-scrollhint .a3d-icon, .a3d-controls .a3d-btn.is-busy .a3d-icon { animation: none; }
}
