/* Splash-only styling; the gallery and replay control retain their own language. */
dialog.gp-splash {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  color: #171717;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: none;
  outline: none;
  opacity: 1;
  transition: opacity 280ms ease-out;
}
dialog.gp-splash[open] { display: block; }
/* Native modal inertness remains, but nothing opaque or blurred hides the live
   homepage below the single fading surface. Never fade the children separately. */
dialog.gp-splash::backdrop { background: transparent; backdrop-filter: none; }
dialog.gp-splash.gp-splash--leaving { opacity: 0; }
html.gp-splash-active { scrollbar-gutter: stable; }
.gp-splash *, .gp-splash *::before, .gp-splash *::after { box-sizing: border-box; }

/* Continue the very first browser paint inside the real modal, behind its clickable field. */
.gp-splash > #gp-opening-bed { position:absolute !important; inset:0; z-index:0 !important; pointer-events:none; }
.gp-splash > #gp-opening-bed ~ .gp-splash__field { z-index:1; background:transparent; }

/* No visible chrome, caption, or helper around the artwork. */
.gp-splash .gp-splash__header,
.gp-splash .gp-splash__footer,
.gp-splash .gp-splash__edition { display: none; }
.gp-splash__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.gp-splash__field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f4f2ee;
  isolation: isolate;
}
.gp-splash .gp-splash__tile,
.gp-splash .gp-splash__leaf,
.gp-splash .gp-splash__hold {
  position: absolute;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  opacity: 1;
  animation: none;
  -webkit-tap-highlight-color: transparent;
}
.gp-splash .gp-splash__tile,
.gp-splash .gp-splash__leaf {
  z-index: 0;
  cursor: crosshair;
  touch-action: manipulation;
}
/* Each shared boundary belongs to the fragment below or to the right. */
.gp-splash__tile::after,
.gp-splash__hold::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 0 solid #fff;
  border-left-width: var(--seam-left, 0px);
  border-top-width: var(--seam-top, 0px);
}
.gp-splash__tile > gp-art,
.gp-splash__leaf > gp-art,
.gp-splash__hold > gp-art {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scale(var(--gp-detail-scale, 1.6));
  transform-origin: center;
}
/* Match the early opening bed's artwork-only treatment. Keep this on gp-art,
   not its field/tile: signatures, controls and white split seams stay untouched. */
.gp-splash .gp-splash__field gp-art {
  filter: brightness(1.06) contrast(1.035);
}
/* All motion is local to a clipped crop; the geometric boundaries stay still. */
.gp-splash__field gp-art { position: absolute; inset: 0; }
.gp-splash__field .gp-splash__quick { z-index: 0; }
.gp-splash__field gp-art[kind="original"] { z-index: 1; }
/* The one-play signature stays large in the same position over the interactive field. */
.gp-intro-signature { position:absolute; inset:0; z-index:5; overflow:hidden; pointer-events:none; user-select:none; }
.gp-intro-signature[hidden] { display:none; }
.gp-intro-signature__wash { position:absolute; inset:0; opacity:0; background:radial-gradient(ellipse 62% 58% at 50% 44%,rgba(26,22,18,.36),rgba(26,22,18,.14) 56%,transparent 88%); transition:opacity 240ms ease-out; }
.gp-intro-signature:is([data-state="writing"],[data-state="finished"],[data-state="still"]) .gp-intro-signature__wash { opacity:1; }
.gp-intro-signature__mark { position:absolute; display:block; width:min(66vw,72vh,780px); width:min(66vw,72dvh,780px); height:auto; aspect-ratio:2090/1516; object-fit:contain; left:50%; top:44%; transform:translate(-50%,-50%); opacity:0; pointer-events:none; -webkit-user-drag:none; }
.gp-intro-signature__writing { filter:drop-shadow(0 1px 2px rgb(24 19 10 / 70%)); }
.gp-intro-signature:is([data-state="writing"],[data-state="finished"]) .gp-intro-signature__writing { opacity:1; }
.gp-intro-signature__still { filter:brightness(0) invert(1) drop-shadow(0 1px 2px rgb(24 19 10 / 70%)); }
.gp-intro-signature[data-state="still"] .gp-intro-signature__still { opacity:1; }
@media(max-width:650px){ .gp-intro-signature__mark { width:min(84vw,69dvh); } }
@media(prefers-reduced-motion:reduce){ .gp-intro-signature__wash { transition:none; } }

/* Geometry stays supplied by the parent; only the old leaf's opacity changes. */
.gp-splash .gp-splash__hold {
  z-index: 2;
  pointer-events: none;
  transition: opacity 55ms ease-out;
}
.gp-splash .gp-splash__hold.gp-splash__dissolve { opacity: 0; }

/* Center near 85% of the viewport height; safe areas win on short landscape screens. */
.gp-splash > .gp-splash__enter {
  position: absolute;
  top: auto;
  bottom: max(calc(15% - 23px), calc(env(safe-area-inset-bottom, 0px) + 12px));
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 144px;
  min-height: 46px;
  max-width: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  margin: 0;
  padding: 10px 22px;
  border: 1px solid rgba(65, 59, 49, .22);
  border-radius: 2px;
  color: #302d27;
  background: rgba(255, 253, 247, .9);
  box-shadow: 0 1px 5px rgba(20, 18, 14, .08);
  font: 400 14px/1.3 Georgia, 'Times New Roman', serif;
  letter-spacing: .025em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .gp-splash > .gp-splash__enter:hover {
    background: rgba(255, 253, 247, .97);
    border-color: rgba(65, 59, 49, .38);
  }
}
.gp-splash .gp-splash__tile:focus,
.gp-splash .gp-splash__leaf:focus { outline: none; }
.gp-splash[data-keyboard="true"] > .gp-splash__enter:focus {
  outline: 2px solid #302d27;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(255, 253, 247, .95);
}
.gp-splash[data-keyboard="true"] .gp-splash__tile:focus,
.gp-splash[data-keyboard="true"] .gp-splash__leaf:focus {
  outline: 2px solid #fff;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 6px #171717;
}

/* Replay remains independent from splash arrival-focus behavior. */
.gp-splash-replay:focus-visible {
  outline: 2px solid #161616;
  outline-offset: 4px;
}
#menu-dialog nav .gp-splash-replay {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 17px 0;
  border: 0;
  border-top: 1px solid #d3d3d3;
  border-radius: 0;
  text-align: left;
  color: #171717;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce) {
  dialog.gp-splash,
  .gp-splash > .gp-splash__enter,
  .gp-splash .gp-splash__hold { transition: none; }
}
@media (forced-colors: active) {
  .gp-splash > .gp-splash__enter,
  .gp-splash > .gp-splash__enter:hover {
    color: ButtonText;
    background: ButtonFace;
    border-color: ButtonText;
    box-shadow: none;
    forced-color-adjust: auto;
  }
  .gp-splash > .gp-splash__enter:focus-visible,
  .gp-splash[data-keyboard="true"] > .gp-splash__enter:focus { box-shadow: none; }
  .gp-splash > .gp-splash__enter:focus-visible,
  .gp-splash[data-keyboard="true"] > .gp-splash__enter:focus { outline-color: Highlight; }
  .gp-splash[data-keyboard="true"] .gp-splash__tile:focus,
  .gp-splash[data-keyboard="true"] .gp-splash__leaf:focus { outline-color: Highlight; }
}
