/* The pj-* components, from the approved design system (components/bundle.css), unchanged except that
   the Google Fonts @import is gone: the fonts are self-hosted in site.css, so no visitor request leaves the site. */

/* Poppinjay Web components, prefixed pj- (NOT ad-: EasyList and AdGuard hide .ad-header, .ad-button, .ad-footer and more, so a reader with a content blocker lost the header, the buttons and the footer; Safari, 2026-10-28). Every value comes from tokens.css; the game's shapes (BowTheme, Components.kt) in CSS. */

/* ---- the page ground: one look, set explicitly so a dark browser still shows the day sky ---- */
.pj-page {
  color-scheme: light;
  /* the sky as an IMAGE, not a background colour: WebKit paints past the page's ends (Safari's bounce, under its toolbar)
     with the body's background COLOUR laid over the root's, so a sky colour here kept the bounce sky whatever the root
     said; with none, the root's colour (assets/js/ground.js: grass in the page's bottom half) shows through */
  background: linear-gradient(var(--sky), var(--sky));
  color: var(--plum);
  font-family: var(--font-rounded);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
}
.pj-sky {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-dawn) 70%, var(--sky-golden) 100%);
}

/* ---- OutlinedWord: a cream word with a plum stroke and a 2px shadow (design/OutlinedText) ---- */
.pj-word {
  color: var(--cream);
  -webkit-text-stroke: calc(var(--stroke-word) * 2) var(--plum);
  paint-order: stroke fill;
  text-shadow: var(--shadow-word);
  text-wrap: balance;
  margin: 0;
}
.pj-word--sm {
  -webkit-text-stroke-width: calc(var(--stroke-word-sm) * 2);
}
.pj-word--coral { color: var(--coral); }
.pj-word--lemon { color: var(--lemon); }
.pj-word--sky-blue { color: var(--sky-blue); }

/* ---- ChunkyButton: a rounded face on a darker base, both outlined plum; a press sinks the face ---- */
.pj-button {
  --face: var(--coral);
  --base: var(--coral-base);
  --h: var(--button-height);
  position: relative;
  display: inline-block;
  min-width: 180px;
  min-height: var(--touch);
  padding: 0 0 var(--button-depth);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pj-button::before {
  content: "";
  position: absolute;
  inset: var(--button-depth) 0 0;
  background: var(--base);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
}
.pj-button__face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  padding: 0 var(--gutter);
  background: var(--face);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pj-button__face::after {
  /* the gloss: a pale pill across the top fifth of the face, inset 10px, sheen at 35 % */
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 6px;
  height: 20%;
  border-radius: 999px;
  background: var(--sheen);
  opacity: 0.35;
}
.pj-button__face > .pj-word {
  position: relative;
  font-family: var(--font-rounded);
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  white-space: nowrap;
  -webkit-text-stroke-width: calc(var(--stroke-word-sm) * 2);
  transform: translateY(-1px);
}
.pj-button:hover .pj-button__face { transform: translateY(1px); }
.pj-button:active { transform: scale(0.92); }
.pj-button:active .pj-button__face { transform: translateY(var(--button-depth)); }
.pj-button:focus-visible { outline: none; }
.pj-button:focus-visible .pj-button__face {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.pj-button--sm { --h: 44px; min-width: 0; }
.pj-button--sm .pj-button__face > .pj-word { font-size: 17px; }
.pj-button--block { display: block; width: 100%; }
.pj-button--tangerine { --face: var(--tangerine); --base: var(--tangerine-base); }
.pj-button--mint { --face: var(--mint); --base: var(--mint-base); }
.pj-button--sky-blue { --face: var(--sky-blue); --base: var(--sky-blue-base); }
.pj-button--grape { --face: var(--grape); --base: var(--grape-base); }
.pj-button--bubblegum { --face: var(--bubblegum); --base: var(--bubblegum-base); }

/* ---- Panel: a cream card, plum outline, the game's 18px corner, a flat offset lift ---- */
.pj-panel {
  background: var(--cream);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: var(--gutter);
  color: var(--plum);
}
@media (min-width: 720px) {
  .pj-panel { padding: var(--space-24); }
}

/* ---- Chip: a counter pill (coins, ribbons, a price) ---- */
.pj-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  padding: 4px 14px 4px 4px;
  background: var(--cream);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius-pill);
  color: var(--plum);
  font-family: var(--font-rounded);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.pj-chip__dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--gold);
  border: var(--stroke-outline) solid var(--plum);
  box-sizing: border-box;
  flex: none;
}
.pj-chip__value {
  font-size: 22px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- ScreenshotFrame: a game capture in the panel's outline, with an optional caption ---- */
.pj-shot { margin: 0; display: grid; gap: var(--gap); }
.pj-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  background: var(--sky);
}
.pj-shot figcaption {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--plum);
}

/* ---- Links: plum words with a thick coral underline (sky-blue words fail 4.5:1 on cream) ---- */
.pj-link {
  color: var(--plum);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  border-radius: 4px;
}
.pj-link:hover { text-decoration-color: var(--coral-shade); }
.pj-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---- SiteHeader ---- */
.pj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding-block: var(--gutter);
}
.pj-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.pj-header__brand:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pj-header__icon {
  width: 44px;
  height: 44px;
  border: var(--stroke-outline) solid var(--plum);
  border-radius: 12px;
  display: block;
}
.pj-header__name {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 32px;
  -webkit-text-stroke-width: calc(var(--stroke-word-sm) * 2);
}
.pj-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  flex-wrap: wrap;
}
.pj-header__link {
  color: var(--plum);
  text-decoration: none;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding-block: 16px;
  border-radius: 4px;
}
.pj-header__link:hover { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.pj-header__link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- SiteFooter: the title's horizon (golden sky, a far hill, the near hill), plum words on the grass ---- */
.pj-footer {
  position: relative;
  background: var(--sky-golden);
  color: var(--plum);
}
.pj-footer__hills { display: block; width: 100%; height: 96px; }
.pj-footer__far { fill: var(--grass-far); }
.pj-footer__near { fill: var(--grass); }
.pj-footer__line { fill: none; stroke: var(--plum); stroke-width: 3px; }
.pj-footer__ground {
  background: var(--grass);
  margin-top: -1px;
  padding-block: 8px var(--space-40);
}
.pj-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
}
.pj-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-24); }
.pj-footer__links a {
  color: var(--plum);
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.pj-footer__links a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pj-footer__small { font-size: 13px; line-height: 16px; letter-spacing: 0.6px; }

/* ---- LegalDocument: a cream reading sheet on the sky, for the privacy policy and the terms ---- */
.pj-legal {
  max-width: var(--measure);
  margin-inline: auto;
  display: grid;
  gap: var(--space-24);
}
.pj-legal__head { display: grid; gap: var(--gap); }
.pj-legal__title { font-family: var(--font-display); font-size: 40px; line-height: 44px; }
.pj-legal__date {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--plum);
}
.pj-legal__sheet {
  background: var(--cream);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: var(--space-24) var(--gutter);
  display: grid;
  gap: var(--space-40);
}
@media (min-width: 720px) {
  .pj-legal__sheet { padding: var(--space-40); }
}
.pj-legal__sheet section { display: grid; gap: 12px; }
.pj-legal h2 {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  color: var(--plum);
  text-wrap: balance;
}
.pj-legal p, .pj-legal li {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: 17px;
  line-height: 28px;
  font-weight: 500;
  color: var(--plum);
}
.pj-legal ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pj-legal li { position: relative; padding-left: 26px; }
.pj-legal li::before {
  /* a tiny coral balloon as the bullet */
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 11px;
  height: 13px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: var(--coral);
  border: 2px solid var(--plum);
}
.pj-legal__short {
  background: var(--sky-dawn);
  border: var(--stroke-outline) solid var(--plum);
  border-radius: var(--radius);
  padding: var(--gutter) var(--space-24);
}
.pj-legal__short p { font-weight: 600; }
.pj-legal__toc { display: flex; flex-wrap: wrap; gap: var(--gap); }
.pj-legal__toc a {
  color: var(--plum);
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--plum);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.pj-legal__toc a:hover { background: var(--sky-dawn); }
.pj-legal__toc a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .pj-button, .pj-button__face { transition: none; }
  .pj-button:active { transform: none; }
}
