:root {
  color-scheme: dark;
  --bg: #0b1821;
  --surface: #122632;
  --text: #f1f6f6;
  --muted: #adc1ca;
  --primary: #95e3dc;
  --accent: #f2c575;
  --border: #3b5965;
  --raised: #1d3946;
  --flow: #46aeb4;
  --ink: #24180d;
  --warning: #ffae95;
  --surface-deep: color-mix(in srgb, var(--bg), var(--surface) 42%);
  --surface-light: color-mix(in srgb, var(--surface), var(--raised) 62%);
  --line-soft: color-mix(in srgb, var(--border), var(--surface) 38%);
  --line-bright: color-mix(in srgb, var(--border), var(--muted) 28%);
  --text-soft: color-mix(in srgb, var(--muted), var(--text) 50%);
  --valve-burnished: color-mix(in srgb, var(--ink), var(--accent) 53%);
  --valve-highlight: color-mix(in srgb, var(--accent), var(--text) 34%);
  --shadow: color-mix(in srgb, black 32%, transparent);
  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 12px;
  --content-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
body.pp-site, .pp-site { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: default; }
a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { color: var(--text); }
:where(a, button, summary, input, textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { margin: 0; color: var(--text); font-family: var(--font-heading); line-height: 1.16; letter-spacing: -.025em; }
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; max-width: 70ch; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }
.wrap { width: min(calc(100% - 48px), var(--content-width)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 4; left: 16px; top: 8px; padding: 8px 16px; border-radius: var(--radius); background: var(--primary); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; border-bottom: 1px solid var(--line-soft); background: var(--surface-deep); }
.site-header .wrap, .site-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.site-header .wrap { min-height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--text); font: 700 20px/1 var(--font-heading); white-space: nowrap; }
.mark img, .mark svg, .mark-icon { flex: none; width: 32px; height: 32px; }
.mark-icon:not(svg) { display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--border), var(--primary) 41%); border-radius: 8px; background: var(--raised); }
.mark-icon:not(svg)::before { content: ""; width: 15px; height: 15px; border: solid var(--primary); border-width: 0 5px 5px 0; border-radius: 0 0 8px 0; transform: translate(-1px, -1px); }
.top-nav { display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--text); }

.hero {
  position: relative;
  padding-block: 32px 40px;
  background: radial-gradient(ellipse at 45% 15%, color-mix(in srgb, var(--surface), var(--flow) 24%) 0, transparent 65%), var(--bg);
}
.hero-copy { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 20px; }
.hero-title { font-size: 48px; letter-spacing: -.04em; }
.hero-deck { color: var(--text-soft); font-size: 16px; max-width: 47ch; margin: 6px 0 0; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; }
.hero-meta:empty { display: none; }
.hero-stage { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-deep); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 20%, transparent); }
.stage-head, .stage-actions { display: flex; align-items: center; gap: 8px 16px; padding: 8px 16px; }
.stage-head { justify-content: space-between; min-height: 46px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 14px; font-weight: 600; }
.stage-head p, .stage-actions p { margin: 0; }
.stage-head span:first-child { color: var(--text); }
.stage {
  position: relative;
  width: 100%;
  height: clamp(430px, 49vw, 560px);
  min-width: 0;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface-deep);
}
.stage iframe { display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; background: var(--surface-deep); }
.stage[data-gf-state="playing"] iframe { z-index: 2; }
.stage:fullscreen { width: 100%; height: 100%; }
.stage-actions { flex-wrap: wrap; min-height: 60px; border-top: 1px solid var(--border); }
.stage-actions :is(a, button), .site-button, .secondary-button, [data-gf-comment-form] button, [data-gf-c-reply] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--surface-light);
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  text-decoration: none;
}
.stage-actions :is(a, button):hover, .site-button:hover, .secondary-button:hover, [data-gf-comment-form] button:hover, [data-gf-c-reply]:hover { background: var(--raised); border-color: color-mix(in srgb, var(--line-bright), var(--primary) 41%); }
.stage-actions [data-gf-liked], .stage-actions [aria-pressed="true"] { color: var(--primary); border-color: color-mix(in srgb, var(--line-bright), var(--primary) 63%); }
.stage-actions [data-gf-fullscreen] { margin-inline-start: auto; }
.stage-actions [data-gf-share-msg] { color: var(--primary); font-size: 14px; }
.stage-actions :is(svg, img) { width: 18px; height: 18px; }

.stage [data-gf-loading] { position: absolute; z-index: 1; inset: 0; display: none; place-items: center; padding: 24px; text-align: center; color: var(--primary); background: var(--bg); font: 700 20px/1.4 var(--font-heading); }
.stage[data-gf-state="loading"] [data-gf-loading]:not([hidden]) { display: grid; }
.stage [data-gf-loading]::before { content: ""; position: absolute; left: calc(50% - 36px); top: calc(50% - 56px); width: 72px; height: 14px; border: 2px solid color-mix(in srgb, var(--flow), var(--primary) 59%); border-radius: 16px; background: linear-gradient(90deg, var(--raised) 10%, var(--primary) 50%, var(--raised) 90%) 0 0 / 220% 100%; animation: fill-pipe 1.1s linear infinite; }
@keyframes fill-pipe { to { background-position: -180% 0; } }

.pump-cover {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  align-items: center;
  justify-items: center;
  gap: clamp(16px, 5vw, 64px);
  padding: clamp(16px, 5vw, 56px);
  background:
    radial-gradient(ellipse at 22% 52%, color-mix(in srgb, var(--raised), var(--flow) 24%) 0%, transparent 53%),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--muted) 6%, transparent) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--muted) 6%, transparent) 0 1px, transparent 1px 26px),
    var(--surface);
}
.stage[data-gf-state="loading"] .pump-cover, .stage[data-gf-state="playing"] .pump-cover { display: none; }
.cover-figure { width: min(100%, 390px); min-width: 0; margin: 0; }
.cover-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-deep);
  box-shadow: 0 8px 24px var(--shadow);
}
.cover-board-image { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--radius); }
.cover-cell {
  position: relative;
  border-radius: 6px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--raised), var(--border) 30%), var(--raised) 78%);
  box-shadow: inset 0 0 0 1px var(--border);
}
.cover-cell::before, .cover-cell::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--line-bright); opacity: .7; }
.cover-cell::before { left: 6px; top: 6px; }
.cover-cell::after { bottom: 6px; right: 6px; }
.cover-tube {
  position: absolute;
  z-index: 1;
  background: linear-gradient(var(--angle, 0deg), color-mix(in srgb, var(--raised), var(--flow) 50%) 5%, color-mix(in srgb, var(--flow), var(--primary) 30%) 36%, color-mix(in srgb, var(--primary), var(--text) 30%) 57%, var(--flow) 78%, color-mix(in srgb, var(--raised), var(--flow) 40%));
  box-shadow: 0 2px 4px var(--shadow);
}
.cover-tube.east, .cover-tube.west { top: 39%; width: 56%; height: 22%; }
.cover-tube.east { right: -2px; }
.cover-tube.west { left: -2px; }
.cover-tube.north, .cover-tube.south { --angle: 90deg; left: 39%; height: 56%; width: 22%; }
.cover-tube.north { top: -2px; }
.cover-tube.south { bottom: -2px; }
.cover-elbow, .cover-valve, .cover-pump, .cover-tank, .cover-collar { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cover-elbow { width: 22%; aspect-ratio: 1; background: color-mix(in srgb, var(--flow), var(--primary) 40%); }
.cover-elbow.sw { border-top-right-radius: 100%; }
.cover-elbow.nw { border-bottom-right-radius: 100%; }
.cover-collar { border: 1px solid color-mix(in srgb, var(--muted), var(--primary) 40%); border-radius: 2px; background: color-mix(in srgb, var(--border), var(--flow) 46%); }
.cover-collar.horizontal { width: 12%; height: 31%; }
.cover-collar.vertical { width: 31%; height: 12%; }
.cover-valve {
  width: 44%;
  max-width: 38px;
  aspect-ratio: 1;
  border: 2px solid var(--valve-highlight);
  border-radius: 50%;
  background: repeating-conic-gradient(var(--accent) 0 17deg, var(--valve-burnished) 17deg 40deg, var(--accent) 40deg 60deg);
  box-shadow: 0 2px 6px var(--shadow);
}
.cover-valve::after { content: ""; position: absolute; inset: 25%; border: 2px solid color-mix(in srgb, var(--ink), var(--accent) 27%); border-radius: 50%; background: var(--valve-burnished); }
.cover-pump, .cover-tank {
  display: grid;
  place-items: center;
  width: 61%;
  max-width: 49px;
  aspect-ratio: 1;
  color: var(--text);
  font: 700 16px/1 var(--font-heading);
  box-shadow: 0 2px 6px var(--shadow);
}
.cover-pump { border: 3px solid color-mix(in srgb, var(--primary), var(--text) 22%); border-radius: 50%; background: color-mix(in srgb, var(--raised), var(--flow) 31%); }
.cover-tank { border: 2px solid color-mix(in srgb, var(--flow), var(--primary) 58%); border-radius: 8px; background: color-mix(in srgb, var(--raised), var(--flow) 20%); }
.cover-heading { margin-bottom: 12px; font: 700 clamp(28px, 3.4vw, 46px)/1.08 var(--font-heading); letter-spacing: -.035em; }
.cover-description { max-width: 29ch; margin-bottom: 24px; color: var(--text-soft); font-size: 16px; }
.cover-copy { width: 100%; }
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 1px solid var(--valve-highlight);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--accent);
  box-shadow: 0 3px 0 var(--valve-burnished);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.play-button:hover { background: var(--valve-highlight); }
.play-button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--valve-burnished); }
.play-glyph { display: inline-block; width: 0; height: 0; border-block: 6px solid transparent; border-inline-start: 9px solid currentColor; }

.content-band, .help-panel, .prose, .comments-band { padding-block: clamp(32px, 6vw, 64px); }
.content-band + .content-band, .content-band + .help-panel, .content-band + .comments-band, .help-panel + .comments-band { border-top: 1px solid var(--line-soft); }
.content-band h2, .help-panel h2, .comments-band h2 { margin-bottom: 16px; }
.content-band h3 { margin-bottom: 8px; }
.content-band p, .help-panel p, .prose p, .prose li { color: var(--text-soft); }
.flow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block: 24px; }
.flow-card { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.flow-card:nth-child(2) { border-top-color: var(--accent); }
.flow-card p { margin-bottom: 0; }
.flow-card strong, .flow-value { color: var(--accent); }
.help-panel { background: var(--surface-deep); }
.faq-list { display: grid; gap: 8px; margin-block: 18px 0; }
.faq-list details { padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-light); }
.faq-list summary { min-height: 44px; padding: 14px 4px; cursor: pointer; font-weight: 600; }
.faq-list summary::marker { color: var(--primary); }
.faq-list details p { margin: 0 0 16px 16px; }
.prose { max-width: min(100% - 48px, 780px); margin-inline: auto; }
.prose-header { margin-bottom: 32px; }
.prose :is(h2, h3) { margin-top: 28px; margin-bottom: 12px; }
.prose ul, .prose ol { max-width: 70ch; padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose :is(code, kbd) { border: 1px solid var(--line-bright); border-radius: 4px; padding: 1px 4px; background: var(--surface); color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border-bottom: 1px solid var(--border); padding: 8px 12px; text-align: left; overflow-wrap: anywhere; }
.prose :is(h1, h2, h3, p, li) { overflow-wrap: break-word; }
.site-footer { border-top: 1px solid var(--line-soft); padding-block: 24px; background: var(--surface-deep); color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { min-height: 28px; color: var(--text-soft); }
[data-gf-comments][data-gf-empty]::after { content: "Have a tip for another player? Share it here."; display: block; color: var(--muted); margin-top: 12px; }
[data-gf-comments][data-gf-off]::after { content: none; }
[data-gf-comment-form] { display: grid; gap: 8px; max-width: 620px; margin: 16px 0; }
[data-gf-comment-form] input, [data-gf-comment-form] textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  background: var(--surface-light);
  color: var(--text);
}
[data-gf-comment-form] textarea { min-height: 104px; resize: vertical; }
[data-gf-comment-form] button { justify-self: start; }
[data-gf-c-text] { color: var(--text-soft); overflow-wrap: anywhere; white-space: pre-wrap; }
[data-gf-c-time] { color: var(--muted); font-size: 14px; }
[data-gf-comments] article { padding: 16px; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

@media (max-width: 820px) {
  .wrap { width: min(calc(100% - 36px), var(--content-width)); }
  .hero-title { font-size: 42px; }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: min(calc(100% - 32px), var(--content-width)); }
  .site-header .wrap { min-height: 58px; gap: 4px 12px; }
  .mark { gap: 8px; font-size: 18px; }
  .mark img, .mark svg, .mark-icon { width: 27px; height: 27px; }
  .top-nav { gap: 2px 12px; }
  .top-nav a { font-size: 13px; }
  .hero { padding-block: 24px 32px; }
  .hero-copy { margin-bottom: 12px; }
  .hero-title, h1 { font-size: 32px; }
  .hero-deck { font-size: 15px; }
  .stage { height: 526px; }
  .stage-head, .stage-actions { padding-inline: 12px; }
  .stage-actions { column-gap: 8px; }
  .stage-actions :is(a, button) { padding-inline: 10px; }
  .pump-cover { grid-template-columns: 1fr; place-content: center; gap: 18px; padding: 20px; }
  .cover-figure { width: min(100%, 274px); }
  .cover-board { padding: 8px; }
  .cover-copy { order: -1; text-align: center; max-width: 360px; }
  .cover-heading { font-size: 28px; }
  .cover-heading br { display: none; }
  .cover-description { margin: 0 auto 12px; max-width: 33ch; font-size: 14px; }
  .play-button { width: 100%; }
  .flow-grid { grid-template-columns: 1fr; }
  .prose { width: calc(100% - 32px); max-width: 780px; }
  .site-footer .wrap { align-items: start; flex-direction: column; }
  h2 { font-size: 24px; }
}
@media (max-width: 360px) {
  .top-nav { column-gap: 8px; }
  .mark { font-size: 16px; }
  .pump-cover { padding: 14px; }
  .cover-heading { font-size: 25px; }
  .stage-actions [data-gf-fullscreen] { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage [data-gf-loading]::before { animation: none; }
}
.pp-embed-shell {
  min-height: 100vh;
  background: var(--surface-deep);
}
.pp-game {
  --ppg-frame: var(--surface-deep);
  --ppg-panel: var(--surface);
  --ppg-metal: var(--raised);
  --ppg-line: var(--border);
  --ppg-ink: var(--text);
  --ppg-muted: var(--muted);
  --ppg-flow: var(--primary);
  --ppg-gold: var(--accent);
  --ppg-warn: var(--warning);
  box-sizing: border-box;
  width: min(100%, 690px);
  padding: 13px;
  margin: 0 auto;
  color: var(--ppg-ink);
  font: 500 14px/1.4 system-ui, sans-serif;
  text-align: left;
}
.pp-game *, .pp-game *::before, .pp-game *::after { box-sizing: border-box; }
.pp-game [hidden] { display: none !important; }
.pp-game :where(p, h2, fieldset) { margin: 0; }
.pp-game button {
  min-width: 0;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid var(--ppg-line);
  border-radius: 7px;
  color: var(--ppg-ink);
  background: var(--ppg-metal);
  font: 700 13px/1.2 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.pp-game button:disabled { opacity: .58; cursor: default; }
.pp-game button:focus-visible { outline: 3px solid var(--ppg-gold); outline-offset: 2px; z-index: 2; }
.pp-game__header, .pp-game__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.pp-game__header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.pp-game__stage-kicker {
  color: var(--ppg-gold);
  font: 800 12px/1.5 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pp-game__title {
  color: var(--ppg-ink);
  font: 800 clamp(17px, 3.1vw, 23px)/1.2 system-ui, sans-serif;
  letter-spacing: -.02em;
}
.pp-game__levels {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
}
.pp-game__levels button {
  min-width: 0;
  min-height: 40px;
  padding: 4px;
  font-variant-numeric: tabular-nums;
}
.pp-game__levels [aria-current="step"], .pp-game__split-options [aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--ppg-gold);
  background: var(--ppg-gold);
}
.pp-game__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .76fr);
  align-items: start;
  gap: 12px;
}
.pp-game__board-area { min-width: 0; }
.pp-game__board {
  display: grid;
  grid-template-columns: repeat(var(--ppg-size, 3), minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--ppg-line);
  border-radius: 11px;
  background: var(--bg);
}
.pp-game__board[data-solved] { border-color: var(--ppg-flow); }
.pp-game .pp-game__board[data-dense] .pp-game__tile { border-radius: 5px; }
.pp-game .pp-game__tile {
  --ppg-joint: var(--border);
  --ppg-inner: var(--muted);
  display: block;
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: radial-gradient(circle at 40% 25%, var(--raised), var(--surface-light));
}
.pp-game button.pp-game__tile:hover { border-color: var(--line-bright); }
.pp-game .pp-game__tile--blank {
  border-color: var(--surface-deep);
  background: repeating-linear-gradient(140deg, var(--bg) 0 3px, var(--surface-deep) 3px 6px);
}
.pp-game .pp-game__tile[data-wet] { --ppg-joint: color-mix(in srgb, var(--surface), var(--flow) 51%); --ppg-inner: var(--ppg-flow); }
.pp-game .pp-game__tile[data-acted="true"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border), var(--primary) 50%); }
.pp-game .pp-game__tile[data-fault] { border-color: var(--ppg-warn); }
.pp-game .pp-game__tile--split { background: radial-gradient(circle at 45% 25%, color-mix(in srgb, var(--surface), var(--accent) 25%), color-mix(in srgb, var(--surface), var(--accent) 12%)); }
.pp-game .pp-game__tile--pump, .pp-game .pp-game__tile--outlet { background: radial-gradient(circle at 45% 25%, color-mix(in srgb, var(--raised), var(--flow) 10%), var(--surface-light)); }
.pp-game__tile svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pp-game__joint { stroke: var(--ppg-joint); stroke-width: 21; fill: none; }
.pp-game__inner { stroke: var(--ppg-inner); stroke-width: 10; fill: none; }
.pp-game__pipe-number { fill: var(--text); font: 800 35px/1 system-ui, sans-serif; text-anchor: middle; }
.pp-game__outlet-letter { fill: var(--text); font: 800 29px/1 system-ui, sans-serif; text-anchor: middle; }
.pp-game__tile-label {
  position: absolute;
  inset: auto 0 2px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 1px 2px;
  border-radius: 3px;
  color: var(--valve-highlight);
  background: color-mix(in srgb, var(--ink), var(--accent) 17%);
  font: 800 12px/1.2 system-ui, sans-serif;
  letter-spacing: -.035em;
  white-space: nowrap;
  text-transform: uppercase;
  pointer-events: none;
}
.pp-game__panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--ppg-line);
  border-radius: 10px;
  background: var(--ppg-panel);
}
.pp-game__goal { min-height: 3em; color: var(--ppg-muted); }
.pp-game__readings, .pp-game__split-options { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
.pp-game__reading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid var(--ppg-line);
  border-radius: 5px;
  color: var(--ppg-muted);
  background: var(--surface-deep);
  font-size: 12px;
}
.pp-game__reading output { font-size: 13px; color: var(--ppg-ink); white-space: nowrap; }
.pp-game__reading[data-full] output { color: var(--ppg-flow); }
.pp-game__split { min-width: 0; padding: 0; border: 0; }
.pp-game__split legend { padding: 0; font-size: 12px; font-weight: 750; color: var(--ppg-gold); }
.pp-game__split p { margin: 1px 0 4px; color: var(--ppg-muted); font-size: 12px; }
.pp-game__split-options button { padding: 4px 2px; min-height: 34px; font-variant-numeric: tabular-nums; }
.pp-game__status { min-height: 2.8em; color: var(--ppg-muted); font-size: 12px; }
.pp-game__status[data-won] { color: var(--ppg-flow); }
.pp-game__moves { margin-left: auto; white-space: nowrap; color: var(--ppg-muted); font-size: 12px; }
.pp-game .pp-game__next { color: var(--bg); background: var(--ppg-flow); border-color: transparent; }
.pp-game__load-error { margin: 8px 0; color: var(--ppg-warn); }

@media (max-width: 565px) {
  .pp-game__levels { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pp-game__board[data-dense] { width: min(100%, 330px); max-width: none; gap: 1px; padding: 3px; }
  .pp-game__main { grid-template-columns: 1fr; gap: 8px; }
  .pp-game__board { width: min(100%, 265px); margin-inline: auto; }
  .pp-game__panel { gap: 7px; }
  .pp-game__goal, .pp-game__status { min-height: 0; }
}
@media (max-width: 380px) {
  .pp-game { padding: 8px; }
  .pp-game__board { max-width: 238px; }
  .pp-game__panel { padding: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .pp-game button { transition: border-color 140ms ease, background-color 140ms ease; }
}
.pp-game .pp-game__tile[data-wet] { --ppg-inner: var(--muted); }
.pp-game__water { stroke: var(--ppg-flow); stroke-width: 9; fill: none; }
.pp-game__hub { fill: var(--ppg-inner); }
.pp-game__tile[data-wet] .pp-game__hub { fill: var(--ppg-flow); }
.pp-game__hub-pump { fill: color-mix(in srgb, var(--raised), var(--flow) 39%); stroke: var(--ppg-flow); stroke-width: 4; }
.pp-game__hub-outlet { fill: color-mix(in srgb, var(--raised), var(--flow) 13%); stroke: var(--text-soft); stroke-width: 3; }
.pp-game__hub-valve { fill: var(--valve-burnished); stroke: var(--accent); stroke-width: 4; }
.pp-game__spokes { stroke: var(--valve-highlight); stroke-linecap: round; stroke-width: 4; fill: none; }

@media (max-width: 640px) {
  .stage[data-gf-state="playing"]:not(:fullscreen) { height: max(630px, var(--pipes-stage-height, 0px)); }
  .stage:fullscreen { height: 100%; }
}
@media (min-width:641px){.stage[data-gf-state=playing]{min-height:610px}.stage:fullscreen{height:100%}}



/* Titanium pipework and lime flow, scoped to the cover and playable board. */
:is(.pump-cover, .pp-embed-shell) {
  --pipe-plum: #241637;
  --pipe-metal: #c1cde8;
  --pipe-water: #c8ff4f;
  --pipe-rim: color-mix(in srgb, var(--pipe-plum) 45%, var(--pipe-metal));
  --pipe-flow-dash: color-mix(in srgb, var(--pipe-water) 36%, var(--pipe-plum));
  --pipe-frame: color-mix(in srgb, var(--pipe-plum) 63%, black);
  --bg: var(--pipe-frame);
  --surface: color-mix(in srgb, var(--pipe-plum) 96%, var(--pipe-metal));
  --raised: color-mix(in srgb, var(--pipe-plum) 89%, var(--pipe-metal));
  --muted: var(--pipe-metal);
  --border: color-mix(in srgb, var(--pipe-plum) 65%, var(--pipe-metal));
  --primary: var(--pipe-water);
  --flow: color-mix(in srgb, var(--pipe-water) 80%, var(--pipe-plum));
  --surface-deep: color-mix(in srgb, var(--pipe-frame) 76%, var(--surface));
  --surface-light: color-mix(in srgb, var(--surface) 38%, var(--raised));
  --line-soft: color-mix(in srgb, var(--border) 62%, var(--surface));
  --line-bright: color-mix(in srgb, var(--border) 72%, var(--muted));
  --text-soft: color-mix(in srgb, var(--muted), var(--text) 50%);
}

.pump-cover .cover-board {
  background: var(--pipe-frame);
  border-color: var(--border);
}
.pump-cover .cover-cell {
  background: var(--pipe-plum);
}
.pump-cover .cover-tube {
  background: linear-gradient(
    var(--angle, 0deg),
    var(--pipe-rim) 0 16%,
    var(--pipe-metal) 16% 30%,
    var(--pipe-water) 30% 70%,
    var(--pipe-metal) 70% 84%,
    var(--pipe-rim) 84%
  );
}
.pump-cover .cover-elbow { background: var(--pipe-water); }
.pump-cover .cover-collar { background: var(--pipe-rim); border-color: var(--pipe-metal); }

.pp-game .pp-game__tile:not(.pp-game__tile--blank) {
  border-radius: 9px;
  background: radial-gradient(circle at 38% 24%, var(--raised), var(--pipe-plum) 86%);
}
.pp-game .pp-game__tile.pp-game__tile--split {
  background: radial-gradient(circle at 45% 25%, color-mix(in srgb, var(--pipe-plum), var(--accent) 21%), var(--pipe-plum) 86%);
}
.pp-game .pp-game__tile,
.pp-game .pp-game__tile[data-wet] {
  --ppg-joint: var(--pipe-rim);
  --ppg-inner: var(--pipe-metal);
}
.pp-game__joint { stroke-width: 29; stroke-linecap: round; }
.pp-game__inner { stroke-width: 16; stroke-linecap: round; }
.pp-game__hub { stroke: var(--pipe-rim); stroke-width: 4; }
.pp-game__water {
  stroke: var(--pipe-water);
  stroke-width: 15;
  filter: drop-shadow(0 0 2.4px color-mix(in srgb, var(--pipe-water) 64%, transparent));
}
.pp-game__water-glint {
  fill: none;
  stroke: var(--pipe-flow-dash);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 3 7;
}
