/* Bamboo Twist legal pages. Standalone: no shared site styles, fonts or scripts.
   Colours come from the game's theme (tools/build_theme.gd in the game). */
@font-face {
  font-family: "Fredoka";
  src: url("assets/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --ink: #33402c;
  --muted: #5f6b56;
  --green: #5cb544;
  --green-lip: #3d8a2c;
  --green-edge: #2f6e22;
  --link: #2f7a22;
  --cream: #fff6e0;
  --cream-lip: #d9b98a;
  --wood: #7a4e1e;
  --page: #eef3df;
  --paper: #fffdf5;
  --rule: #ece1c4;
  --todo: #ffe58a;
  --shadow: rgba(51, 64, 44, .16);
  --veil: rgba(255, 253, 245, .55);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2e4;
    --muted: #b4bfa8;
    --link: #8fd477;
    --cream: #2a2d20;
    --cream-lip: #4a4230;
    --wood: #e2b47c;
    --page: #121810;
    --paper: #1b2217;
    --rule: #323b2b;
    --todo: #6b5a12;
    --shadow: rgba(0, 0, 0, .45);
    --veil: rgba(18, 24, 16, .62);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Banner: the World 1 bamboo forest with the panda waving. */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 40px 16px 72px;
  background: var(--page) url("assets/forest.webp") center 30% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--veil) 0%, transparent 45%, var(--page) 100%);
}
.hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-right: 150px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--green-lip), 0 6px 16px var(--shadow);
}
.app {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  padding: 3px 14px 4px;
  border-radius: 999px;
  background: rgba(255, 253, 245, .92);
  color: #33402c;
  box-shadow: 0 2px 8px rgba(51, 64, 44, .14);
}
h1 {
  margin: 0 0 10px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 3px 0 var(--green-edge), 0 0 2px var(--green-edge), 0 6px 14px rgba(47, 110, 34, .35);
  -webkit-text-stroke: 1.5px var(--green-edge);
  paint-order: stroke fill;
}
.meta {
  display: inline-block;
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 245, .92);
  color: #5f6b56;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(51, 64, 44, .14);
}
.panda {
  position: absolute;
  right: max(16px, calc(50% - 400px));
  bottom: 18px;
  width: 150px;
  height: auto;
  filter: drop-shadow(0 8px 12px rgba(51, 64, 44, .25));
}

/* The page itself: a cream panel, like the game's cards. */
.paper {
  position: relative;
  max-width: 760px;
  margin: -44px auto 48px;
  padding: 32px 28px 28px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--cream-lip), 0 14px 36px var(--shadow);
}
.lede {
  margin: 0 0 12px;
  padding: 16px 20px;
  background: var(--cream);
  border-radius: 16px;
  border-left: 6px solid var(--green);
  font-size: 17px;
}
section { padding-top: 4px; }
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 10px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 23px;
  line-height: 1.25;
}
h2 span {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-lip);
  color: #fff;
  font-size: 17px;
}
h3 {
  margin: 20px 0 4px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--wood);
}
p, ul { margin: 0 0 12px; }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--green); }
a { color: var(--link); font-weight: 600; text-underline-offset: 3px; }
strong { font-weight: 650; }
address {
  margin: 0 0 12px;
  padding: 16px 20px;
  background: var(--cream);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--rule);
  font-style: normal;
}
address strong { display: block; }
mark { background: var(--todo); color: inherit; padding: 0 4px; border-radius: 4px; }

/* Footer: the other page as a green game button. */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed var(--rule);
  color: var(--muted);
  font-size: 14px;
}
.button {
  display: inline-block;
  padding: 10px 24px 12px;
  border-radius: 14px;
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-lip);
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.button:hover { filter: brightness(1.05); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-lip); }

@media (max-width: 560px) {
  .hero { min-height: 0; padding: 28px 16px 64px; }
  .hero-inner { padding-right: 96px; }
  .panda { width: 96px; right: 12px; bottom: 30px; }
  .app-icon { width: 44px; height: 44px; border-radius: 11px; }
  .app { font-size: 19px; }
  .paper { margin: -40px 12px 32px; padding: 24px 18px 20px; border-radius: 20px; }
  h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
