/* Identidade visual da plataforma: tipografia, molduras, folhas e adaptação às telas. */
/* Intuição · folhas e descobertas.
   Revision 3: owner-requested editorial retro, not a dominant pixel interface.
   Local serif titles, utilitarian menus, fine printed rules and pale paper.
   Compact levels and occasional pastel leaves remain; games are unchanged.
   Added presentation only. Functional changes authorized separately are preserved.
   SAFE ROOTS: direct header/footer, #main > .intro/.games, #selection,
   #collection > .level-screen. Never style body/main/collection or game roots.
   The approved intro typography and spacing are shared by menus and all games.
   Board dimensions and gameplay styles remain scoped to their existing roots. */
/* Metric-neutral shell finish, including while playing. No inherited game styles. */
body > header {
  background: #fafbf7;
  border-color: #d4ddd0;
  box-shadow: inset 0 -1px #edf1e8;
  color: #3b342e;
}
body > header .brand-icon {
  color: #71865b;
}
body > header .brand-dot {
  color: #997838;
}
body > header :is(.tag,.doc-link) {
  color: #5a604c;
}
#main > .intro {
  background-color: #fafbf7;
  color: #3b342e;
}
#main > .intro .eyebrow {
  color: #405e49;
}
#main > .intro h1 em {
  color: #405e49;
}
#main > .intro > p:last-child {
  color: #5a604c;
}
#main > .games > button {
  background-color: #fafbf7;
  border-color: #bec9b6;
  color: #3b342e;
  box-shadow: inset 0 2px #ffffff,0 3px #d4ddd0;
}
#main > .games > button[aria-pressed=true] {
  position: relative;
  background: #405e49;
  border-color: #405e49;
  color: #ffffff;
  box-shadow: inset 0 2px #71865b,0 3px #303f32;
}
body > footer {
  background: #edf1e8;
  color: #3b342e;
  border-color: #bec9b6;
  box-shadow: inset 0 3px #fafbf7;
}
body > footer :is(p,small) {
  color: #555344;
}
/* Approved identity remains visible in both existing brand locations while playing.
   Header keeps its original 30px / 45px line box outside menus; menu rules below
   retain the approved larger lockup. No game geometry or selectors are changed. */
body > header .brand {
  display: inline-flex;
  align-items: center;
  color: #3b342e;
  font-family: Georgia,"Times New Roman",serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -1.7px;
  line-height: 1.5;
}
body > header .brand-icon {
  font-size: 0;
  transform: none;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  background: url("platform-assets/leaf-seal.svg") center/28px 28px no-repeat;
}
body > footer .footer-signature {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
body > footer .brand {
  display: inline-flex;
  align-items: center;
  color: #3b342e;
  font-family: Georgia,"Times New Roman",serif;
  font-size: inherit;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.5;
}
body > footer .brand-icon {
  font-size: 0;
  transform: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  background: url("platform-assets/leaf-seal.svg") center/22px 22px no-repeat;
}
body > footer .brand-dot {
  color: #997838;
}
/* Menu shell treatment and the shared reference intro. Only the menu shell
   uses :has; intro typography and spacing never depend on the active game. */
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header {
  padding-top: 24px;
  padding-bottom: 24px;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .brand {
  display: inline-flex;
  align-items: center;
  font-family: Georgia,"Times New Roman",serif;
  font-size: 38px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -1.7px;
  line-height: 1.25;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .brand-icon {
  font-size: 0;
  transform: none;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  vertical-align: -2px;
  background: url("platform-assets/leaf-seal.svg") center/28px 28px no-repeat;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .tag {
  font-family:var(--font-ui);
  font-size: 10px;
  letter-spacing: 1.6px;
  line-height: 1.5;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .doc-link {
  border: 1px solid #bec9b6;
  border-radius: 3px;
  padding: 8px 12px;
  background: transparent;
  box-shadow: none;
}
#main > .intro {
  position: relative;
  isolation: isolate;
  padding: 32px 0 30px 20px;
  min-height: 260px;
  background: none;
}
#main > .intro::before {
  content: "";
  position: absolute;
  inset: 8px -24px 0;
  background: #fafbf7 url("platform-assets/paper-marks.svg") repeat;
  border: 1px solid #dce3d6;
  border-radius: 12px;
  box-shadow: inset 0 0 0 4px #ffffff80,0 0 0 4px #fafbf755;
  z-index: -2;
  pointer-events: none;
}
#main > .intro .eyebrow {
  max-width: 80%;
  font-family:var(--font-ui);
  font-size: 10px;
  letter-spacing: 1.7px;
  margin-bottom: 20px;
}
#main > .intro h1 {
  font-family:var(--font-title);
  font-size: 68px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -2.6px;
  max-width: 100%;
  margin: 0 0 16px;
}
#main > .intro h1 em {
  font-family: inherit;
  font-style: italic;
  font-weight: 400;
  text-shadow: none;
  text-decoration: underline;
  text-decoration-color: #a6b49b;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}
#main > .intro > p:last-child {
  font-size: 14px;
  max-width: 100%;
  line-height: 1.8;
  margin-bottom: 0;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games {
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 28px;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button {
  font-family:var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .2px;
  font-weight: 600;
  border-radius: 5px;
  border-width: 1px;
  padding: 16px 18px;
  position: relative;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button > span {
  font-family:var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  opacity: 1;
  color: #666950;
  vertical-align: 1px;
  margin-right: 12px;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button[aria-pressed=true] > span {
  color: #d3ddb5;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button small {
  font-family:var(--font-ui);
  font-size: 11px;
  line-height: 1.6;
  opacity: 1;
  margin-left: 28px;
  color: #62634f;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button[aria-pressed=true] small {
  color: #e2e6ce;
}
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > footer > span {
  font-family:var(--font-title);
  font-size: 26px;
  font-style: italic;
  letter-spacing: -.5px;
  font-weight: 700;
}
/* Shared selection roots. Play screens never match these. */
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) {
  background: #fafbf7;
  border: 1px solid #b3c1a8;
  border-radius: 7px;
  padding: 30px;
  box-shadow: 0 3px #e7ebe2;
  color: #3b342e;
  margin-bottom: 34px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .eyebrow {
  color: #405e49;
  font-family:var(--font-ui);
  font-size: 10px;
  letter-spacing: 1.6px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) h2 {
  font-family:var(--font-title);
  font-weight: 400;
  font-size: 35px;
  line-height: 1.3;
  letter-spacing: -.7px;
  color: #405e49;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) > p:not(.eyebrow) {
  font-size: 14px;
  line-height: 1.75;
  max-width: 880px;
  color: #585644;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .stage-heading {
  font-family:var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: .4px;
  border-bottom: 1px solid #cbd4c3;
  padding-bottom: 10px;
  color: #405e49;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) :is(button,select,.file-button) {
  border: 1px solid #b3c1a8;
  border-radius: 5px;
  background: #ffffff;
  color: #3b342e;
  box-shadow: 0 2px #e3e9dd;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) :is(button,select,.file-button):not(.level-tile) {
  font-family:var(--font-ui);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 600;
  min-height: 44px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .primary {
  background: #405e49;
  color: #ffffff;
  border-color: #405e49;
  box-shadow: 0 2px #354b3a;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-group {
  grid-template-columns: repeat(auto-fill,minmax(68px,1fr));
  gap: 8px;
  margin: 14px 0 22px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile {
  border-radius: 24%;
  min-height: 64px;
  padding: 5px;
  background: #f3f6ef;
  border-color: #c0cbb7;
  color: #3b342e;
  gap: 4px;
  box-shadow: 0 2px #dfe7d8;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile > span {
  font-family:var(--font-ui);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 400;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile > small {
  font-family:var(--font-ui);
  font-size: 10px;
  line-height: 1.5;
  color: #62604c;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile.done {
  background: #486c4d;
  color: #fff;
  border-color: #405e49;
  box-shadow: 0 2px #354b3a;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile.done > small {
  color: #fff;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile[aria-current=true] {
  outline: 2px solid #997838;
  outline-offset: 2px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .duel-maps > button {
  background: #f3f6ef;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .duel-maps > button small {
  font-family:var(--font-ui);
  color: #585644;
}
/* Existing preview symbols preserved exactly, not recolored or pixelized. */
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .map-preview {
  color: #25372e;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .collection-small {
  font-family:var(--font-ui);
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) :is(button,select,.file-button):hover:not(:disabled) {
  border-color: #405e49;
  box-shadow: inset 0 0 0 1px #71865b,0 2px #b7c09b;
}
#main > .games > button:hover {
  border-color: #405e49;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) button:active:not(:disabled), #main > .games > button:active {
  box-shadow: inset 2px 2px #3b342e33;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) :is(button,select,input):focus-visible, #main > .games > button:focus-visible, body > header a:focus-visible {
  outline: 3px solid #405e49;
  outline-offset: 4px;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) button:disabled {
  opacity: .45;
}
@media(max-width:1050px) {
  #main > .intro h1 {
    font-size: 58px;
  }
}
@media(max-width:760px) {
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header {
    padding: 18px 20px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .brand {
    font-size: 31px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .brand-icon {
    width: 22px;
    height: 22px;
    background-size: 22px;
    margin-right: 5px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header .doc-link {
    font-size: 10px;
    padding: 7px 8px;
  }
  #main > .intro {
    padding: 24px 4px 24px 12px;
    min-height: 0;
  }
  #main > .intro::before {
    inset: 6px -8px 0;
    border-radius: 9px;
  }
  #main > .intro :is(h1,.eyebrow,p:last-child) {
    max-width: 100%;
  }
  #main > .intro h1 {
    font-size: 46px;
    letter-spacing: -1.8px;
    line-height: 1.1;
  }
  #main > .intro .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 18px;
  }
  #main > .intro > p:last-child {
    font-size: 12px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 24px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button {
    font-size: 14px;
    padding: 14px 12px;
    line-height: 1.5;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button > span {
    font-size: 11px;
    display: block;
    margin-bottom: 2px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) #main > .games > button small {
    font-size: 10px;
    margin: 3px 0 0;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) {
    padding: 22px 14px;
    box-shadow: 0 3px #e7ebe2;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) h2 {
    font-size: 28px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) > p:not(.eyebrow) {
    font-size: 13px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .stage-heading {
    font-size: 13px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-group {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 6px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile > span {
    font-size: 20px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile > small {
    font-size: 9px;
  }
}
@media(max-width:370px) {
  #main > .intro {
    padding-bottom: 26px;
  }
  #main > .intro h1 {
    font-size: 39px;
  }
  :where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header {
    gap: 10px;
    padding: 16px;
  }
}
/* Delicate inner frames, platform only. They do not consume layout space. */
#main > .games > button {
  box-shadow: inset 0 -2px #e8ede3,0 1px #dce4d4;
}
#main > .games > button[aria-pressed=true] {
  box-shadow: inset 0 -2px #314d39,0 1px #303f32;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) {
  box-shadow: inset 0 0 0 5px #fafbf7,inset 0 0 0 6px #e5eadd,0 3px #e3e9dd;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .duel-maps > button {
  box-shadow: inset 0 -2px #e8ede3,0 1px #dce4d4;
}
/* Keep the established menu header and mobile tile metrics unchanged. */
:where(body:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header {
  position: relative;
  z-index: 1;
}
@media(max-width:760px) {
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) .level-tile {
    min-height: 58px;
  }
}
/* Pressed feedback follows frame styles and remains metric-neutral. */
#main > .games > button:active {
  box-shadow: inset 2px 2px #3b342e33;
}
/* Owner-authorized document decoration. The body only establishes a containing
   block; no size, typography, overflow or game styles are changed. The inert
   sibling clips itself and follows dynamic document height without JS. */
body:has(> .platform-leaf-layer) {
  position: relative;
}
body > .platform-leaf-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
  container-type: size;
}
/* Only the canopy adopts pixel art. The added header border reserves space
   without changing text, game widths, or the approved leaf motion rules. */
body > header {
  border-top: 88px solid #fafbf7;
}
body > .platform-leaf-layer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 88px;
  pointer-events: none;
  background: url("platform-assets/tree-canopy-natural-filled.svg") center top/960px 88px repeat-x;
  image-rendering: pixelated;
  opacity: .82;
}
@media(max-width:760px) {
  body > header {
    border-top-width: 64px;
  }
  body > .platform-leaf-layer::before {
    height: 64px;
    background-size: 720px 66px;
  }
}
body > .platform-leaf-layer > .platform-leaf {
  position: absolute;
  top: -48px;
  width: 22px;
  height: 30px;
  pointer-events: none;
  background: url("platform-assets/leaf-sage.svg") center/contain no-repeat;
  opacity: .32;
  animation: platform-leaf-fall 140s linear infinite;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(1) {
  left: 3%;
  width: 16px;
  height: 22px;
  opacity: .28;
  animation-duration: 130s;
  animation-delay: -14s;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(2) {
  left: 20%;
  width: 32px;
  height: 38px;
  opacity: .18;
  background-image: url("platform-assets/leaf-honey.svg");
  animation-duration: 165s;
  animation-delay: -96s;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(3) {
  left: 38%;
  width: 21px;
  height: 29px;
  opacity: .4;
  background-image: url("platform-assets/leaf-clay.svg");
  animation-duration: 120s;
  animation-delay: -49s;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(4) {
  left: 56%;
  width: 14px;
  height: 19px;
  opacity: .45;
  animation-duration: 110s;
  animation-delay: -80s;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(5) {
  left: 74%;
  width: 38px;
  height: 46px;
  opacity: .2;
  background-image: url("platform-assets/leaf-clay.svg");
  animation-duration: 180s;
  animation-delay: -30s;
}
body > .platform-leaf-layer > .platform-leaf:nth-child(6) {
  left: 92%;
  width: 24px;
  height: 29px;
  opacity: .38;
  background-image: url("platform-assets/leaf-honey.svg");
  animation-duration: 145s;
  animation-delay: -110s;
}
/* A quieter distant plane follows the viewport; six foreground leaves stay
   anchored to the document. Sixteen leaves total, no cursor/scroll event listeners. */
body > .platform-leaf-foreground {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
  container-type: size;
}
body > .platform-leaf-foreground > .platform-leaf {
  position: absolute;
  top: -48px;
  pointer-events: none;
  width: 14px;
  height: 19px;
  opacity: .18;
  background: url("platform-assets/leaf-sage.svg") center/contain no-repeat;
  animation: platform-leaf-fall 35s linear infinite;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(1) {
  left: 5%;
  animation-duration: 24s;
  animation-delay: -2s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(2) {
  left: 15%;
  width: 22px;
  height: 28px;
  opacity: .22;
  background-image: url("platform-assets/leaf-honey.svg");
  animation-duration: 39s;
  animation-delay: -9s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(3) {
  left: 25%;
  width: 16px;
  height: 22px;
  opacity: .3;
  background-image: url("platform-assets/leaf-clay.svg");
  animation-duration: 19s;
  animation-delay: -7s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(4) {
  left: 35%;
  width: 24px;
  height: 30px;
  opacity: .15;
  animation-duration: 34s;
  animation-delay: -15s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(5) {
  left: 45%;
  animation-duration: 28s;
  animation-delay: -16s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(6) {
  left: 55%;
  width: 22px;
  height: 28px;
  opacity: .22;
  background-image: url("platform-assets/leaf-honey.svg");
  animation-duration: 22s;
  animation-delay: -15s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(7) {
  left: 65%;
  width: 16px;
  height: 22px;
  opacity: .3;
  background-image: url("platform-assets/leaf-clay.svg");
  animation-duration: 37s;
  animation-delay: -29s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(8) {
  left: 75%;
  width: 24px;
  height: 30px;
  opacity: .15;
  animation-duration: 31s;
  animation-delay: -28s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(9) {
  left: 85%;
  width: 16px;
  height: 22px;
  opacity: .3;
  background-image: url("platform-assets/leaf-clay.svg");
  animation-duration: 26s;
  animation-delay: -12s;
}
body > .platform-leaf-foreground > .platform-leaf:nth-child(10) {
  left: 95%;
  width: 22px;
  height: 28px;
  opacity: .22;
  background-image: url("platform-assets/leaf-honey.svg");
  animation-duration: 33s;
  animation-delay: -25s;
}
@keyframes platform-leaf-fall {
  0% {
    transform: translate3d(0,-48px,0) rotate(-25deg);
  }
  25% {
    transform: translate3d(-12px,calc(25cqh - 12px),0) rotate(20deg);
  }
  50% {
    transform: translate3d(12px,calc(50cqh + 24px),0) rotate(65deg);
  }
  75% {
    transform: translate3d(-8px,calc(75cqh + 60px),0) rotate(95deg);
  }
  100% {
    transform: translate3d(18px,calc(100cqh + 96px),0) rotate(135deg);
  }
}
@media(prefers-reduced-motion:reduce) {
  body > .platform-leaf-foreground > .platform-leaf {
    display: none;
    animation: none;
  }
  body > .platform-leaf-layer > .platform-leaf {
    display: none;
    animation: none;
  }
}
/* Fixed floor reservation prevents layout shifts; leaf clusters accumulate once. */
body > footer {
  border-bottom: 112px solid #fafbf7;
}
body > .platform-leaf-layer::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 112px;
  pointer-events: none;
  background: url("platform-assets/leaf-piles-base.svg") center bottom/960px 112px repeat-x;
  image-rendering: pixelated;
  opacity: .8;
}
body > .platform-leaf-layer > .platform-pile {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 112px;
  pointer-events: none;
  background-position: center bottom;
  background-size: 960px 112px;
  background-repeat: repeat-x;
  image-rendering: pixelated;
  opacity: 0;
  animation: platform-pile-arrive 6s steps(6,end) forwards;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(7) {
  background-image: url("platform-assets/leaf-pile-growth-1.svg");
  animation-delay: 20s;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(8) {
  background-image: url("platform-assets/leaf-pile-growth-2.svg");
  animation-delay: 45s;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(9) {
  background-image: url("platform-assets/leaf-pile-growth-3.svg");
  animation-delay: 75s;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(10) {
  background-image: url("platform-assets/leaf-pile-growth-4.svg");
  animation-delay: 110s;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(11) {
  background-image: url("platform-assets/leaf-pile-growth-5.svg");
  animation-delay: 155s;
}
body > .platform-leaf-layer > .platform-pile:nth-of-type(12) {
  background-image: url("platform-assets/leaf-pile-growth-6.svg");
  animation-delay: 210s;
}
@keyframes platform-pile-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: .8;
  }
}
@media(max-width:760px) {
  body > footer {
    border-bottom-width: 84px;
  }
  body > .platform-leaf-layer::after,body > .platform-leaf-layer > .platform-pile {
    height: 84px;
    background-size: 720px 84px;
  }
}
@media(prefers-reduced-motion:reduce) {
  body > .platform-leaf-layer > .platform-pile {
    animation: none;
    opacity: .5;
  }
}
/* Interactive floor replaces, never duplicates, the existing static leaf art. */
body > .platform-leaf-layer.platform-piles-interactive::after {
  visibility: hidden;
}
body > .platform-leaf-layer.platform-piles-interactive > .platform-pile {
  visibility: hidden;
}
body > .platform-leaf-layer > .platform-pile-surface {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 112px;
  overflow: visible;
  pointer-events: none;
  user-select: none;
  shape-rendering: crispEdges;
}
@media(max-width:760px) {
  body > .platform-leaf-layer > .platform-pile-surface {
    height: 84px;
  }
}
/* Header-only tree frame: curved gutter trunks connect to the existing canopy.
   Pure paint: no padding, border widths, text metrics, event or game changes. */
body > header {
  position: relative;
  border-bottom-color: transparent;
  box-shadow: none;
}
body > header::before {
  content: "";
  position: absolute;
  inset: -28px 0 -1px;
  pointer-events: none;
  user-select: none;
  background: url("platform-assets/header-tree-frame.svg") center/100% 100% no-repeat;
}
@media(max-width:760px) {
  body > header::before {
    top: -20px;
  }
}
/* Continuous tree perimeter. Replace the former closed rectangles and detached
   accents with tangent joins; decorations never change the content box. */
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) {
  position: relative;
  --frame-flare:max(38px,calc((100vw - 1280px)/2 + 28px));
  background: #fff;
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 4px #34452a12);
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen)::before {
  content: none;
}
body:has(#selection:not([hidden]), #collection:not([hidden]) > .level-screen, #repasse:not([hidden]) > .level-screen, #orbita:not([hidden]) > .level-screen, #broto:not([hidden]) > .level-screen, #cerco:not([hidden]) > .level-screen) > footer {
  position: relative;
  z-index: 1;
  background: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen)::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--frame-flare) - .5px);
  width: calc(100% + 2 * var(--frame-flare) + 1px);
  bottom: -246px;
  height: 247px;
  pointer-events: none;
  user-select: none;
  background: url("platform-assets/continuous-root-left.svg") left/var(--frame-flare) 100% no-repeat,url("platform-assets/continuous-root-right.svg") right/var(--frame-flare) 100% no-repeat,linear-gradient(#fff,#fff) center/calc(100% - 2 * var(--frame-flare)) 100% no-repeat;
}
#main > .intro {
  --hero-flare:max(14px,calc((100vw - 1280px)/2 + 4px));
}
#main > .intro::before {
  inset: 101px -24.5px 0;
  background: #fff;
  border: 1px solid #b3c1a8;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
}
#main > .intro::after {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(-24px - var(--hero-flare));
  width: calc(100% + 48px + 2 * var(--hero-flare));
  height: 94px;
  background: url("platform-assets/soft-crown-left.svg") left/var(--hero-flare) 100% no-repeat,url("platform-assets/soft-crown-right.svg") right/var(--hero-flare) 100% no-repeat,linear-gradient(#fff,#fff) center/calc(100% - 2 * var(--hero-flare)) 100% no-repeat;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
@media(max-width:760px) {
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen) {
    --frame-flare:14px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen)::after {
    bottom: -202px;
    height: 203px;
  }
  #main > .intro {
    --hero-flare:6px;
  }
  #main > .intro::before {
    inset: 45px -8.5px 0;
    border-radius: 0 0 9px 9px;
  }
  #main > .intro::after {
    top: 6px;
    left: calc(-8px - var(--hero-flare));
    width: calc(100% + 16px + 2 * var(--hero-flare));
    height: 40px;
  }
}
/* One continuous white crown behind the canopy, header and hero opening.
   Clip only this inert paint plane, not the header or its focus outlines.
   The shadow supplies viewport-wide paint without adding scrollable width. */
body:where(:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header {
  background: transparent;
  border-top-color: transparent;
}
body:where(:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header::after {
  content: "";
  position: absolute;
  inset: -88px 0 -9px;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
@media(max-width:760px) {
  body:where(:not(:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab))) > header::after {
    inset: -64px 0 -7px;
  }
}
/* The same tree finish in all active games, including free/editor/Endless.
   Paint only: existing padding, borders' widths, overflow and game coordinates
   stay unchanged. The root lives in the footer, outside clipped game surfaces. */
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > header {
  background: transparent;
  border-top-color: transparent;
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > header::after {
  content: "";
  position: absolute;
  inset: -88px 0 -9px;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro {
  position: relative;
  isolation: isolate;
  background: none;
  --hero-flare:max(14px,calc((100vw - 1280px)/2 + 4px));
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro::before {
  content: "";
  position: absolute;
  inset: 101px -24.5px 0;
  background: #fff;
  border: 1px solid #b3c1a8;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  pointer-events: none;
  user-select: none;
  z-index: -2;
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro::after {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(-24px - var(--hero-flare));
  width: calc(100% + 48px + 2 * var(--hero-flare));
  height: 94px;
  background: url("platform-assets/soft-crown-left.svg") left/var(--hero-flare) 100% no-repeat,url("platform-assets/soft-crown-right.svg") right/var(--hero-flare) 100% no-repeat,linear-gradient(#fff,#fff) center/calc(100% - 2 * var(--hero-flare)) 100% no-repeat;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
#main > .lab:not([hidden]), #collection:not([hidden]) > .collection-lab, #repasse:not([hidden]) > .repasse-lab, #orbita:not([hidden]) > .orbita-lab {
  background: #fff;
  border-color: #b3c1a8;
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > footer {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  --game-root-flare:max(38px,calc((100vw - 1280px)/2 + 28px));
}
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > footer::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -113px;
  left: calc(40px - var(--game-root-flare) + .5px);
  width: calc(100% - 80px + 2 * var(--game-root-flare) - 1px);
  background: url("platform-assets/continuous-root-left.svg") left/var(--game-root-flare) 100% no-repeat,url("platform-assets/continuous-root-right.svg") right/var(--game-root-flare) 100% no-repeat,linear-gradient(#fff,#fff) center/calc(100% - 2 * var(--game-root-flare)) 100% no-repeat;
  filter: drop-shadow(0 2px 4px #34452a12);
  clip-path: inset(0 -12px -12px);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
@media(max-width:760px) {
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > header::after {
    inset: -64px 0 -7px;
  }
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro {
    --hero-flare:6px;
  }
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro::before {
    inset: 45px -8.5px 0;
    border-radius: 0 0 9px 9px;
  }
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .intro::after {
    top: 6px;
    left: calc(-8px - var(--hero-flare));
    width: calc(100% + 16px + 2 * var(--hero-flare));
    height: 40px;
  }
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > footer {
    --game-root-flare:14px;
  }
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) > footer::before {
    left: calc(16px - var(--game-root-flare) + .5px);
    width: calc(100% - 32px + 2 * var(--game-root-flare) - 1px);
    bottom: -85px;
  }
}
/* Breathing room in active games; only navigation and lower action surfaces.
   Board sizes, inner coordinates, game colors and feedback remain untouched. */
body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .games {
  margin-top: 24px;
  gap: 18px;
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) .level-actions {
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 16px;
  background: #fff;
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) .level-actions :is(.actions,.collection-toolbar) {
  gap: 12px;
  flex-wrap: wrap;
}
#main > .lab .level-notes {
  background: #fff;
}
:is(#collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) .collection-surface {
  background-image: linear-gradient(to top,#fff 20px,transparent 20px);
}
#collection > .collection-lab .collection-replay {
  background: #fff;
  margin: 0;
  padding: 10px 24px;
}
@media(max-width:760px) {
  body:has(.lab:not([hidden]), #collection:not([hidden]) > .collection-lab) #main > .games {
    margin-top: 20px;
    gap: 12px;
  }
  :is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) .level-actions {
    gap: 12px;
    padding-top: 18px;
    padding-bottom: 16px;
  }
}
/* Original owner-provided flowers: passive accents, never game pieces.
   Transparent PNGs stay byte-identical; variations use size/rotation only. */
#main > .intro h1::before,#main > .intro h1::after {
  content: "";
  position: absolute;
  pointer-events: none;
  user-select: none;
  background: url("platform-assets/flower-green-original.png") center/contain no-repeat;
  opacity: .55;
}
#main > .intro h1::before {
  right: -8px;
  top: 18px;
  width: 42px;
  height: 42px;
  transform: rotate(12deg);
}
#main > .intro h1::after {
  right: -5px;
  top: 53px;
  width: 26px;
  height: 26px;
  transform: rotate(-22deg);
  opacity: .36;
}
:is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen)::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 6px;
  width: 48px;
  height: 56px;
  background: url("platform-assets/flower-green-original.png") right top/34px 34px no-repeat,url("platform-assets/flower-green-original.png") left bottom/23px 23px no-repeat;
  pointer-events: none;
  user-select: none;
  opacity: .5;
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading {
  position: relative;
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::before,:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 24px;
  height: 24px;
  background: url("platform-assets/flower-green-original.png") center/contain no-repeat;
  pointer-events: none;
  user-select: none;
  opacity: .52;
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::before {
  top: 2px;
  transform: rotate(-18deg);
}
:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::after {
  bottom: 2px;
  transform: rotate(22deg);
  width: 19px;
  height: 19px;
  opacity: .34;
}
body > footer::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 18px;
  width: 58px;
  height: 56px;
  background: url("platform-assets/flower-green-original.png") right top/40px 40px no-repeat,url("platform-assets/flower-green-original.png") left bottom/27px 27px no-repeat;
  pointer-events: none;
  user-select: none;
  opacity: .5;
}
@media(max-width:760px) {
  #main > .intro h1::before {
    right: -8px;
    top: 6px;
    width: 28px;
    height: 28px;
  }
  #main > .intro h1::after {
    right: -5px;
    top: 30px;
    width: 20px;
    height: 20px;
  }
  :is(#selection, #collection > .level-screen, #repasse > .level-screen, #orbita > .level-screen, #broto > .level-screen, #cerco > .level-screen)::before {
    right: 1px;
    top: 2px;
    width: 30px;
    height: 42px;
    background-size: 25px 25px,18px 18px;
  }
  :is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::before,:is(#main > .lab, #collection > .collection-lab, #repasse > .repasse-lab, #orbita > .orbita-lab) > .lab-heading::after {
    left: -1px;
    width: 18px;
    height: 18px;
  }
  body > footer::after {
    right: 18px;
    top: 16px;
    width: 42px;
    height: 44px;
    background-size: 30px 30px,21px 21px;
  }
}
/* Give the footer signature breathing room inside the curved panel edge. */
body > footer .footer-signature {
  padding-inline-start: 24px;
  max-width: 100%;
}
@media(max-width:600px) {
  body > footer .footer-signature {
    padding-inline-start: 16px;
  }
}
/* Category-only screens have no level panel to paint the original curved roots.
   Reuse that same artwork in the footer; floor height and leaf physics stay intact. */
body:not(:has(#main > section:not(.intro):not([hidden]))) > footer {
  position: relative;
  isolation: isolate;
  z-index: 1;
  background: transparent;
  border-top-color: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  --menu-root-flare:max(38px,calc((100vw - 1280px)/2 + 28px));
}
body:not(:has(#main > section:not(.intro):not([hidden]))) > footer::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -113px;
  left: calc(40px - var(--menu-root-flare) + .5px);
  width: calc(100% - 80px + 2 * var(--menu-root-flare) - 1px);
  background: url("platform-assets/continuous-root-left.svg") left/var(--menu-root-flare) 100% no-repeat,url("platform-assets/continuous-root-right.svg") right/var(--menu-root-flare) 100% no-repeat,linear-gradient(#fff,#fff) center/calc(100% - 2 * var(--menu-root-flare)) 100% no-repeat;
  filter: drop-shadow(0 2px 4px #34452a12);
  clip-path: inset(0 -12px -12px);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}
@media(max-width:760px) {
  body:not(:has(#main > section:not(.intro):not([hidden]))) > footer {
    --menu-root-flare:14px;
  }
  body:not(:has(#main > section:not(.intro):not([hidden]))) > footer::before {
    left: calc(16px - var(--menu-root-flare) + .5px);
    width: calc(100% - 32px + 2 * var(--menu-root-flare) - 1px);
    bottom: -85px;
  }
}
