@font-face {
  font-family: HourSerif;
  src: local("Baskerville"), local("Iowan Old Style"), local("Palatino");
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  --bg: #0c2029;
  --panel: #122c35;
  --ink: #f2eada;
  --muted: #9eb7bc;
  --accent: #e5bd7b;
  --line: #ffffff1c;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body.stillform {
  --bg: #eee9de;
  --panel: #e5ded0;
  --ink: #38362e;
  --muted: #706c5d;
  --accent: #805142;
  --line: #514a3625;
}
body.orbitline {
  --bg: #141522;
  --panel: #1f2033;
  --ink: #f5e8d9;
  --muted: #b4acc7;
  --accent: #f3ba99;
  --line: #eac7ff22;
}
body.glasshouse {
  --bg: #edf0e5;
  --panel: #e0e6d8;
  --ink: #2a4237;
  --muted: #607064;
  --accent: #345d49;
  --line: #344e3628;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 11px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.18s;
  touch-action: manipulation;
}
button:hover {
  background: var(--line);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button.primary,
.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
  font-weight: 650;
}
.primary:hover {
  filter: brightness(1.08);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
button:focus-visible {
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 15px;
  top: -60px;
  z-index: 20;
  background: var(--ink);
  color: var(--bg);
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.topbar {
  height: 89px;
  max-width: 1400px;
  margin: auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: HourSerif, Georgia, serif;
  font-size: 26px;
  letter-spacing: -1px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  font-size: 31px;
  color: var(--accent);
  font-family: Georgia, serif;
}
.toplinks {
  display: flex;
  gap: 28px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.toplinks a {
  opacity: 0.75;
}
.toplinks a:hover {
  opacity: 1;
}
.game-layout {
  max-width: 1290px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 65px;
  padding: 55px 5vw 35px;
  align-items: start;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.game-info h1 {
  font:
    normal clamp(43px, 4vw, 64px)/1.06 HourSerif,
    Georgia,
    serif;
  letter-spacing: -2px;
  margin: 0 0 20px;
}
.lead {
  font:
    20px/1.45 HourSerif,
    Georgia,
    serif;
  margin: 0 0 16px;
}
.description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 26px;
}
.mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  gap: 20px;
}
.mode-tabs button {
  border: none;
  border-radius: 0;
  padding: 10px 0 12px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.mode-tabs button[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}
.level-select {
  display: block;
  width: 100%;
  margin: 10px 0 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px;
  border-radius: 7px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
  margin: 24px 0;
}
.stats div + div {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.stats span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.stats strong {
  display: block;
  font:
    27px/1.5 HourSerif,
    Georgia,
    serif;
  font-weight: normal;
}
.note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.text-button {
  border: none;
  padding: 5px 0;
  color: var(--accent);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.info-controls {
  display: flex;
  gap: 20px;
  margin-top: 25px;
}
.stage-wrap {
  min-width: 0;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
}
.stage-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.stage-top strong {
  font-weight: 500;
  color: var(--ink);
}
.stage {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 70px #0002;
  background: var(--panel);
}
.stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.stage-bottom {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 19px;
}
.tools {
  display: flex;
  gap: 8px;
}
.tools button {
  font-size: 12px;
  padding: 9px 13px;
}
.message {
  min-height: 44px;
  color: var(--accent);
  font-size: 12px;
  margin: 15px 0 0;
  text-align: center;
}
.keyboard-note {
  color: var(--muted);
  font-size: 11px;
}
.dpad {
  display: flex;
  gap: 5px;
}
.dpad button {
  width: 43px;
  height: 42px;
  padding: 0;
  font-size: 20px;
}
.game-footer {
  max-width: 1160px;
  padding: 30px 0;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.game-footer a {
  color: var(--ink);
}
.result-score {
  font:
    64px/1.2 HourSerif,
    Georgia,
    serif;
  color: var(--accent);
  margin: 20px 0;
}
.medal {
  color: var(--accent);
  font-size: 28px;
  letter-spacing: 8px;
}
dialog {
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 42px;
  width: min(480px, calc(100% - 32px));
  max-height: 85vh;
  box-shadow: 0 30px 100px #0006;
}
dialog::backdrop {
  background: #040b13b8;
  backdrop-filter: blur(7px);
}
dialog h2 {
  font:
    36px/1.1 HourSerif,
    Georgia,
    serif;
  letter-spacing: -1px;
  margin: 6px 0 24px;
}
dialog p,
dialog li {
  font-size: 14px;
  color: var(--muted);
}
dialog ul {
  padding-left: 18px;
}
#dialog-close {
  position: absolute;
  top: 10px;
  right: 15px;
  border: 0;
  font-size: 25px;
  padding: 0 8px;
}
#dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
#share-text {
  width: 100%;
  background: var(--panel);
  color: var(--ink);
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: 14px/1.5 monospace;
}
.rule {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.rule strong {
  font-weight: 550;
  display: block;
}
.rule span {
  color: var(--muted);
  font-size: 11px;
}
.rule svg {
  width: 35px;
  height: 35px;
  flex: none;
}
.puzzle-grid {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 12px;
  background: #403b3214;
  position: absolute;
  inset: 17% 10%;
  box-shadow:
    inset 0 2px 12px #30271c25,
    0 1px 0 #fff8;
}
.puzzle-grid button {
  padding: 0;
  border: 1px solid #ffffff12;
  border-radius: 5px;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: #ffffff25;
  transition: background 0.15s;
  touch-action: manipulation;
}
.puzzle-grid button::after {
  content: "";
  width: 3px;
  height: 3px;
  background: #564c3722;
  position: absolute;
  left: calc(50% - 1px);
  top: calc(50% - 1px);
  border-radius: 50%;
}
.puzzle-grid button.filled {
  border-color: #fff5;
  box-shadow:
    inset 0 2px 1px #fff4,
    inset 0 -3px 2px #0002,
    0 3px 5px #0002;
}
.puzzle-grid button.filled::after {
  display: none;
}
.puzzle-grid button.ghost {
  box-shadow: inset 0 0 0 3px var(--accent);
  background: #80514222;
}
.puzzle-grid button.invalid {
  background: #bd453822;
}
.stillform .stage {
  background: radial-gradient(ellipse at 30% 0, #f9f7ed, #ded6c5);
}
.stage-inscription {
  position: absolute;
  top: 7%;
  left: 0;
  width: 100%;
  text-align: center;
  font:
    italic 18px HourSerif,
    Georgia,
    serif;
  color: var(--muted);
}
.stage-seal {
  position: absolute;
  bottom: 5%;
  width: 100%;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}
.piece-tray {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  justify-content: center;
  min-height: 83px;
}
.piece {
  position: relative;
  padding: 10px;
  min-width: 64px;
  min-height: 75px;
  background: #ffffff1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.piece[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: #fff5;
}
.piece-label {
  position: absolute;
  bottom: 0;
  right: 5px;
  font-size: 9px;
  color: var(--muted);
}
.mini-piece {
  display: grid;
  gap: 2px;
}
.mini-piece i {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 #fff6,
    inset 0 -1px 0 #0002;
}
.glasshouse .stage {
  background: radial-gradient(ellipse at 50% 0, #c2d3b6, #aebfa9 65%, #7d9a83);
  border-radius: 50% 50% 16px 16px / 18% 18% 16px 16px;
}
.garden-frame {
  position: absolute;
  inset: 4%;
  border: 1px solid #f7f7db60;
  border-radius: 50% 50% 4px 4px / 17% 17% 4px 4px;
  pointer-events: none;
}
.garden-frame::after {
  content: "";
  position: absolute;
  inset: 0 33%;
  border-left: 1px solid #f7f7db50;
  border-right: 1px solid #f7f7db50;
}
.garden-grid {
  position: absolute;
  inset: 19% 9% 9%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 7px;
  background: #50795c55;
  border-radius: 9px;
  box-shadow: 0 15px 30px #23442d35;
  transform: perspective(900px) rotateX(10deg);
}
.garden-grid button {
  padding: 0;
  background: #d6d9bdbb;
  border: 1px solid #ffffff4d;
  border-radius: 4px;
  position: relative;
  overflow: visible;
  min-width: 0;
  min-height: 0;
  box-shadow: 0 3px 0 #718c6d;
}
.garden-grid button:not(:disabled):hover {
  background: #f0ebc8;
}
.garden-grid button:disabled {
  opacity: 1;
  cursor: default;
}
.garden-grid svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(1px 4px 2px #23442d33);
}
.garden-grid .gain {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    25px Georgia,
    serif;
  background: #eaf0dacc;
  border-radius: 4px;
  color: #2b5841;
  opacity: 0;
  pointer-events: none;
}
.garden-grid button:hover .gain,
.garden-grid button:focus-visible .gain {
  opacity: 1;
}
.seed-tray {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.seed-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 15px;
  background: #f8f8f055;
}
.seed-card svg {
  width: 48px;
  height: 48px;
  flex: none;
}
.seed-card strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.seed-card span {
  font-size: 10px;
  color: var(--muted);
}
.seed-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: #fff9;
  box-shadow: 0 0 0 1px var(--accent);
}
.orbit-launch {
  min-width: 145px;
}
.orbit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: #14152266;
  backdrop-filter: blur(2px);
}
.orbit-overlay[hidden] {
  display: none;
}
.orbit-overlay h2 {
  font:
    38px HourSerif,
    Georgia,
    serif;
  margin: 0;
}
.orbit-overlay p {
  max-width: 250px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.orbit-overlay button {
  padding: 12px 28px;
}
.collection {
  --bg: #eeeae1;
  --panel: #e5e0d5;
  --ink: #303b37;
  --muted: #69736c;
  --accent: #735740;
  --line: #303b3728;
  background:
    radial-gradient(ellipse at 85% 0, #f8f5ec, transparent 50%), var(--bg);
}
.collection-hero {
  max-width: 1160px;
  margin: 70px auto 58px;
  display: flex;
  justify-content: space-between;
  gap: 50px;
  align-items: flex-end;
}
.collection-hero h1 {
  font:
    normal clamp(60px, 7vw, 100px)/0.98 HourSerif,
    Georgia,
    serif;
  letter-spacing: -4px;
  margin: 0;
}
.collection-hero h1 em {
  font-weight: normal;
  color: #818c78;
}
.collection-hero .intro {
  max-width: 280px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  padding-bottom: 3px;
}
.collection-hero .eyebrow {
  margin-bottom: 23px;
}
.collection-pills {
  display: flex;
  gap: 20px;
  margin-top: 25px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.collection-grid {
  max-width: 1160px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 30px;
}
.game-card {
  display: block;
  min-width: 0;
}
.card-art {
  position: relative;
  height: 330px;
  overflow: hidden;
  border-radius: 12px;
  background: #122b35;
  transition: transform 0.4s;
  isolation: isolate;
}
.game-card:hover .card-art {
  transform: translateY(-4px);
}
.card-art canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-art .card-number {
  position: absolute;
  left: 23px;
  top: 18px;
  color: #fff9;
  font-size: 10px;
  letter-spacing: 0.16em;
  z-index: 2;
}
.card-art .play-pill {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 9px 19px;
  border: 1px solid #ffffff55;
  background: #10202644;
  backdrop-filter: blur(10px);
  border-radius: 30px;
  color: #fff;
  font-size: 11px;
  z-index: 2;
}
.game-card:hover .play-pill {
  background: #f1ecdf;
  color: #273730;
}
.card-copy {
  display: flex;
  justify-content: space-between;
  margin-top: 19px;
  gap: 15px;
}
.card-copy h2 {
  font:
    30px/1.2 HourSerif,
    Georgia,
    serif;
  margin: 0;
  letter-spacing: -0.8px;
}
.card-copy .genre {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin-top: 10px;
  white-space: nowrap;
}
.game-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 400px;
}
.collection-bottom {
  max-width: 1160px;
  margin: 65px auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 45px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.collection-bottom h2 {
  font:
    27px HourSerif,
    Georgia,
    serif;
  margin: 0 0 10px;
}
.collection-bottom p {
  font-size: 12px;
  max-width: 400px;
  color: var(--muted);
  margin: 0;
}
.collection-bottom .daily-link {
  font-size: 12px;
  border-bottom: 1px solid;
  padding-bottom: 4px;
  white-space: nowrap;
}
.collection .game-footer {
  margin-bottom: 15px;
}
.collection-tiles {
  position: absolute;
  display: grid;
  gap: 5px;
  width: 235px;
  height: 235px;
  left: calc(50% - 117px);
  top: 48px;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px;
  transform: rotate(-12deg);
  background: #74634c22;
  border-radius: 10px;
  box-shadow: 15px 25px 35px #44362222;
}
.collection-tiles i {
  border-radius: 5px;
  box-shadow:
    inset 0 2px 1px #fff6,
    inset 0 -4px 0 #0002,
    0 3px 5px #0001;
}
.card-stillform {
  background: radial-gradient(ellipse at 20% 0, #f8f2df, #cbbca1);
}
.card-stillform .card-number {
  color: #685c47;
}
.card-garden {
  background: radial-gradient(ellipse at 50% 0, #d0ddbd, #94ae90);
}
.collection-garden {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  width: 250px;
  height: 250px;
  position: absolute;
  left: calc(50% - 125px);
  top: 40px;
  transform: perspective(700px) rotateX(27deg) rotateZ(-17deg);
  padding: 8px;
  background: #6c87624d;
  border-radius: 9px;
  box-shadow: 15px 28px 24px #29462633;
}
.collection-garden div {
  background: #dce1c4;
  border-radius: 3px;
  box-shadow: 0 3px 0 #718c6d;
}
.collection-garden svg {
  width: 100%;
  height: 100%;
}
.card-garden .card-number {
  color: #344d34;
}
@media (min-width: 1450px) {
  .game-layout {
    padding-top: 75px;
    gap: 85px;
  }
  .game-info {
    padding-top: 25px;
  }
}
@media (max-width: 1000px) {
  .game-layout {
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 38px 4vw;
  }
  .game-footer,
  .collection-hero,
  .collection-grid,
  .collection-bottom {
    margin-left: 5vw;
    margin-right: 5vw;
  }
  .game-info h1 {
    font-size: 43px;
  }
  .dpad button {
    width: 34px;
  }
  .stage-bottom {
    flex-wrap: wrap;
  }
  .collection-hero {
    margin-top: 50px;
  }
  .card-art {
    height: 290px;
  }
}
@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 6vw;
  }
  .wordmark {
    font-size: 23px;
  }
  .toplinks {
    gap: 18px;
    font-size: 10px;
  }
  .toplinks .desktop-link {
    display: none;
  }
  .game-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 5vw;
  }
  .game-info {
    width: 100%;
  }
  .game-info h1 {
    font-size: 44px;
    margin-bottom: 10px;
  }
  .game-info .eyebrow {
    margin-bottom: 8px;
  }
  .lead {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .description {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .mode-tabs {
    margin-bottom: 10px;
  }
  .stats {
    margin: 12px 0;
    padding: 9px 0;
  }
  .stats strong {
    font-size: 23px;
  }
  .info-controls {
    position: absolute;
    top: 78px;
    right: 5vw;
    margin: 0;
    gap: 12px;
  }
  .info-controls .text-button {
    font-size: 10px;
  }
  .game-info > .note,
  .keyboard-note {
    display: none;
  }
  .level-select {
    margin: 6px 0 10px;
    padding: 9px;
  }
  .stage-top {
    margin-bottom: 10px;
    font-size: 9px;
  }
  .stage {
    border-radius: 14px;
  }
  .stage-wrap {
    max-width: 520px;
  }
  .stage-bottom {
    margin-top: 12px;
  }
  .dpad button {
    width: 40px;
    height: 39px;
  }
  .tools button {
    padding: 8px 10px;
  }
  .message {
    margin: 10px 0 0;
    min-height: 28px;
  }
  .game-footer {
    margin: 0 5vw;
    padding: 22px 0;
    gap: 20px;
    font-size: 10px;
  }
  .rule-list {
    display: none;
  }
  .piece-tray {
    gap: 6px;
    margin-top: 13px;
  }
  .piece {
    min-width: 50px;
    padding: 7px;
    min-height: 65px;
  }
  .mini-piece i {
    width: 11px;
    height: 11px;
  }
  .seed-card {
    padding: 7px 9px;
    gap: 7px;
  }
  .seed-card svg {
    width: 35px;
    height: 35px;
  }
  .seed-card span {
    font-size: 9px;
  }
  .collection-hero {
    margin: 40px 6vw 35px;
    display: block;
  }
  .collection-hero h1 {
    font-size: 67px;
    letter-spacing: -3px;
  }
  .collection-hero .intro {
    max-width: 330px;
    margin-top: 24px;
  }
  .collection-pills {
    gap: 15px;
    font-size: 9px;
  }
  .collection-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 0 6vw;
  }
  .card-art {
    height: 290px;
  }
  .card-copy h2 {
    font-size: 29px;
  }
  .collection-bottom {
    margin: 45px 6vw;
    display: block;
  }
  .collection-bottom .daily-link {
    display: inline-block;
    margin-top: 25px;
  }
  .collection .game-footer {
    margin: 0 6vw;
  }
  .game-info .mode-tabs {
    max-width: 100%;
  }
  .glasshouse .game-info .description {
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.card-art canvas {
  object-fit: contain;
}
.card-art:has(#lagoon-preview) {
  background: #122f3b;
}
/* Material finishes: printed grain, glazed clay and greenhouse light. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 #ffffff22,
    inset 0 -1px 0 #0002;
}
.stillform .stage::before,
.glasshouse .stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.19;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.27' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stillform .stage {
  box-shadow:
    0 23px 60px #49372016,
    0 1px 1px #fff9;
  background:
    linear-gradient(120deg, #faf6eaa0, transparent 55%),
    radial-gradient(ellipse at 30% 0, #f1ebdc, #d7cbb6);
}
.puzzle-grid {
  border: 1px solid #a18c6855;
  background: linear-gradient(135deg, #c9bba3, #d6c8af);
  box-shadow:
    inset 0 3px 7px #4a352630,
    0 1px 0 #fff8,
    0 15px 30px #4b3c2220;
  padding: 9px;
  gap: 4px;
}
.puzzle-grid button {
  background: linear-gradient(135deg, #d1c4ab, #d8cbb2);
  box-shadow: inset 0 1px 3px #4a382515;
}
.puzzle-grid button.filled {
  background-image: linear-gradient(
    130deg,
    #ffffff1f,
    transparent 48%,
    #00000012
  );
  box-shadow:
    inset 0 2px 1px #fff5,
    inset 0 -4px 2px #0002,
    0 2px 3px #33241122;
}
.piece {
  background: linear-gradient(135deg, #ffffff55, #ffffff11);
  border-color: #7c6b462e;
}
.piece:hover {
  background: #fff8;
}
.mini-piece i {
  box-shadow:
    inset 0 2px 1px #fff6,
    inset 0 -2px 1px #0002,
    1px 2px 2px #30271917;
}
.garden-frame {
  box-shadow:
    0 2px 0 #60806422,
    inset 0 2px 0 #fff4;
}
.glasshouse .stage {
  background:
    linear-gradient(
      130deg,
      #f4f4c72b 8%,
      transparent 8% 22%,
      #f4f4c72b 22% 27%,
      transparent 27% 55%,
      #f4f4c72b 55% 65%,
      transparent 65%
    ),
    radial-gradient(ellipse at 50% 0, #d3dfba, #a9c0a3 65%, #7d9a83);
}
.garden-grid {
  background: #54785e70;
  box-shadow:
    12px 21px 24px #3b563039,
    inset 0 1px 2px #244e352e;
}
.garden-grid button {
  background: linear-gradient(135deg, #e1e3c9, #c4ceae);
}
.garden-grid button:not([aria-disabled="true"]):hover {
  background: #f0edcb;
}
.garden-grid button[aria-disabled="true"] {
  cursor: default;
}
.card-art {
  box-shadow:
    0 12px 28px #453c2910,
    inset 0 1px 0 #fff3;
}
.collection-tiles i {
  background-image: linear-gradient(
    135deg,
    #fff2,
    transparent 70%,
    #0001
  ) !important;
}
.collection-tiles {
  border: 1px solid #a48a6144;
}
.collection-garden div {
  background: linear-gradient(135deg, #e4e6cb, #c7d3af);
}
.mini-piece i {
  position: relative;
}
.mini-piece i.anchor::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  left: calc(50% - 2px);
  top: calc(50% - 2px);
  background: #fff9;
  border-radius: 50%;
  box-shadow: 0 1px 1px #0002;
}
@keyframes take-root {
  from {
    opacity: 0.2;
    transform: translateY(9px) scale(0.75);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.just-planted svg {
  animation: take-root 0.38s cubic-bezier(0.2, 0.7, 0.3, 1);
  transform-origin: 50% 85%;
}
.game-card:focus-visible .play-pill {
  background: #f1ecdf;
  color: #273730;
}
@media (max-width: 380px) {
  .toplinks {
    gap: 10px;
  }
  .wordmark {
    font-size: 21px;
  }
  .game-info h1 {
    font-size: 39px;
  }
  .info-controls {
    gap: 9px;
  }
  .info-controls .text-button {
    font-size: 9px;
  }
  .stage-bottom {
    gap: 8px;
  }
  .dpad {
    gap: 4px;
  }
  .dpad button {
    width: 34px;
    height: 38px;
  }
  .tools {
    gap: 5px;
  }
  .tools button {
    font-size: 11px;
    padding: 8px;
  }
  .collection-hero h1 {
    font-size: 57px;
  }
  .card-copy .genre {
    font-size: 8px;
  }
  .card-copy h2 {
    font-size: 26px;
  }
  .game-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .seed-card {
    padding: 7px;
    gap: 4px;
  }
  .seed-card svg {
    width: 29px;
    height: 29px;
  }
  .seed-card span {
    font-size: 9px;
    line-height: 1.4;
    display: block;
  }
}
.card-art .scene-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-art canvas {
  position: absolute;
  inset: 0;
}
.card-stillform {
  background: #d6c7ac;
}
.card-garden {
  background: #acc39f;
}
/* Keep the playing surface in view on laptops and put play ahead of prose on phones. */
@media (min-width: 721px) and (min-height: 600px) {
  .stage-wrap {
    max-width: min(660px, calc(100svh - 245px));
  }
  .game-layout {
    gap: clamp(28px, 4vw, 65px);
  }
}
@media (max-width: 720px) {
  .game-layout {
    padding-top: 23px;
    gap: 14px;
  }
  .game-info {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: 12px;
    grid-template-areas: "eyebrow eyebrow" "title title" "description description" "mode detail" "stats stats";
  }
  .game-info > .eyebrow {
    grid-area: eyebrow;
    font-size: 9px;
    letter-spacing: 0.12em;
    margin-bottom: 7px;
  }
  .game-info > h1 {
    grid-area: title;
    font-size: 40px;
    margin-bottom: 10px;
  }
  .game-info > .lead {
    display: none;
  }
  .game-info > .description {
    grid-area: description;
    font-size: 11px;
    line-height: 1.65;
    margin-bottom: 10px;
  }
  .game-info > .mode-tabs {
    grid-area: mode;
    align-self: center;
    gap: 12px;
    margin: 0;
    border-bottom: none;
  }
  .game-info > .mode-tabs button {
    font-size: 10px;
    padding: 8px 0;
    white-space: nowrap;
  }
  .game-info > #mode-detail {
    grid-area: detail;
    min-width: 0;
    align-self: center;
  }
  .game-info > #mode-detail > .note {
    display: none;
  }
  .game-info > #mode-detail .level-select {
    font-size: 11px;
    margin: 0;
    padding: 8px 7px;
  }
  .game-info > #mode-detail .text-button {
    font-size: 10px;
  }
  .game-info > .stats {
    grid-area: stats;
    margin: 12px 0 0;
    padding: 8px 0;
  }
  .game-info > #extra-info {
    display: none;
  }
  .game-info > .info-controls {
    top: 76px;
  }
  .stage-wrap {
    max-width: 520px;
  }
  .stage-inscription {
    font-size: 15px;
  }
  .stage-bottom {
    margin-top: 10px;
  }
  .message {
    font-size: 11px;
  }
}

/* Stronger accents and readable controls, with each game's own materials. */
body {
  --accent: #ffce66;
  --muted: #b4cbd0;
  --line: #bddfe22e;
}
body.stillform {
  --bg: #faf2e3;
  --panel: #ebddc5;
  --ink: #302817;
  --muted: #6b583e;
  --accent: #a33e26;
  --line: #704d3438;
}
body.orbitline {
  --bg: #101427;
  --panel: #202b48;
  --accent: #ffc45e;
  --muted: #bcc6e2;
  --line: #a9bce13d;
}
body.glasshouse {
  --bg: #f0f6e9;
  --panel: #d6e8cb;
  --ink: #133e30;
  --muted: #486347;
  --accent: #126c4c;
  --line: #25683c38;
}
.info-controls {
  flex-wrap: wrap;
  gap: 8px;
}
.info-controls .text-button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-decoration: none;
  font-size: 12px;
}
#sound[aria-pressed="true"] {
  border-color: var(--accent);
}
.stage-bottom button,
.mode-tabs button,
#dialog-close {
  min-height: 44px;
}
.dpad button {
  min-width: 44px;
  min-height: 44px;
}
.stage-bottom {
  flex-wrap: wrap;
}
.tools {
  flex-wrap: wrap;
}
.mode-tabs button[aria-pressed="true"] {
  font-weight: 700;
  border-bottom-width: 3px;
}
.stage {
  border-color: var(--line);
  box-shadow:
    0 20px 55px #00121c26,
    inset 0 1px 0 #fff3;
}
.piece[aria-pressed="true"],
.seed-card[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 5px 14px #17341d20;
}
.puzzle-grid button.ghost {
  background: #e8b65b66;
  box-shadow: inset 0 0 0 3px var(--accent);
}
.puzzle-grid button.invalid {
  background: #d5343c55;
  box-shadow: inset 0 0 0 2px #9f2630;
}
.puzzle-grid button {
  border-color: #70502e44;
}
.glasshouse .stage {
  background:
    linear-gradient(
      130deg,
      #ffffed33 8%,
      transparent 8% 22%,
      #ffffed33 22% 27%,
      transparent 27% 55%,
      #ffffed33 55% 65%,
      transparent 65%
    ),
    radial-gradient(ellipse at 50% 0, #dff4b6, #91bd81 65%, #477f5c);
}
.garden-grid {
  background: #28614499;
}
.garden-grid button {
  background: linear-gradient(135deg, #f3f1d7, #cedfaa);
}
.orbit-overlay {
  background: #0d152b66;
}
.orbit-overlay h2 {
  color: #fff4dd;
}
@media (max-width: 720px) {
  .game-info {
    grid-template-areas: "eyebrow eyebrow" "title title" "description description" "controls controls" "mode detail" "stats stats";
  }
  .game-info > .info-controls {
    position: static;
    grid-area: controls;
    margin: 0 0 10px;
  }
  .game-info > .mode-tabs {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .game-info > .mode-tabs button {
    min-height: 44px;
    font-size: 11px;
  }
  .info-controls .text-button {
    font-size: 12px;
  }
  .stage-bottom {
    gap: 10px;
  }
  .dpad {
    gap: 6px;
  }
}
