/* 3D Watermelon Game — shared page styles.
   Tokens match the in-game book UI (UIMockups/kit.py). */

@font-face {
  font-family: "New Farm";
  src: url("/newfarm.otf") format("opentype");
  font-display: swap;
}

:root {
  --ink: #3a2a1a; --soft: #735c47;
  --page: #ede3cf; --field: #f7f0df; --track: #d8cbb0;
  --cover: #5c3a24; --rim: #e8b98a; --table: #3a2a1f;
  --red: #c0533b; --red-dark: #a8452f; --cream: #fff6e0;
  --tape-red: #ef5a5a; --tape-green: #7cc48a;
  --font-display: "New Farm", "Nunito", system-ui, sans-serif;
  --font-body: "Liberation Sans", Arial, Helvetica, sans-serif;
  --ease-pop: cubic-bezier(.34,1.56,.64,1); --dur-fast: 150ms;
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  font-family: var(--font-body); color: var(--ink); background: var(--table);
}

.wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }

/* Logo is a square PNG with transparent padding; cover-crop to a wide band. */
.logo {
  width: min(400px, 80vw); aspect-ratio: 400 / 188; object-fit: cover; object-position: center;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}

/* Book cover → peach rim → paper page, same stack as the Recipe Book. */
.card {
  width: 100%; max-width: 460px; position: relative;
  background: var(--cover); border-radius: 26px; padding: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
}
.page {
  background: var(--page); border: 5px solid var(--rim); border-radius: 16px;
  padding: 42px 34px 30px; text-align: center;
}

/* Washi tape label stuck over the top edge. */
.tape {
  position: absolute; top: -14px; left: 28px; transform: rotate(-3deg);
  padding: 8px 22px 6px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
  color: var(--cream); background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 3px, transparent 3px 9px),
    var(--tape-red);
  clip-path: polygon(0 6%, 4% 0, 10% 5%, 17% 0, 25% 4%, 33% 0, 42% 5%, 50% 0, 58% 4%, 67% 0, 75% 5%, 83% 0, 91% 4%, 100% 0,
                     100% 94%, 96% 100%, 89% 95%, 81% 100%, 73% 96%, 64% 100%, 56% 95%, 48% 100%, 40% 96%, 31% 100%, 23% 95%, 15% 100%, 7% 96%, 0 100%);
}
.tape.green { background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 3px, transparent 3px 9px),
    var(--tape-green); }

h1 {
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
  font-size: 2.4rem; line-height: 1.08; margin: 0 0 14px;
}
h1::after {
  content: ""; display: block; width: 72%; height: 3px; margin: 14px auto 0;
  background: var(--ink); border-radius: 2px;
}

p.tag { color: var(--ink); font-size: 1.05rem; line-height: 1.5; margin: 0 auto 26px; max-width: 34ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 400; line-height: 1;
  padding: 15px 30px 13px; font-size: 1.35rem; border-radius: 12px; text-decoration: none;
  cursor: pointer; border: none; background: var(--red); color: var(--cream);
  box-shadow: 0 3px 0 var(--red-dark);
  transition: background var(--dur-fast) ease, transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) ease;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-dark); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn svg path { fill: currentColor; }

.note { margin-top: 16px; font-size: .85rem; color: var(--soft); }
.foot { font-size: .8rem; color: rgba(255,246,224,.5); text-align: center; margin: 0; }

@media (max-width: 420px) {
  .page { padding: 40px 20px 26px; }
  h1 { font-size: 2rem; }
}
