:root {
  --sky: #7ec8ea;
  --sky2: #d4f0a8;
  --cream: #fff8e8;
  --ink: #16315c;
  --pink: #f4b6c8;
  --pink-deep: #c45d86;
  --gold: #e6c15a;
  --gold-deep: #b88928;
  --blue: #1e4e8c;
  --meadow: #6fbe4a;
  --title: "Cinzel", "Palatino Linotype", Palatino, serif;
  --ui: "Nunito", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.world {
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  background:
    linear-gradient(180deg, #8fd0f0 0%, #bfe7a8 38%, #fff6d8 100%);
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.spark {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 18%, rgba(255,213,106,.8) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 60%, rgba(255,255,255,.7) 0 1.5px, transparent 3px);
}

.nav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.logo img { width: 42px; height: 42px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; box-sizing: border-box; box-shadow: 0 6px 0 rgba(26,33,64,.08); }
.links { display: flex; gap: 8px; }
.links a {
  background: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 800;
  box-shadow: 0 4px 0 rgba(26,33,64,.08);
}

.hero {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  padding: 8px 22px 28px;
}
.hero .cover {
  display: block;
  margin-top: 0;
  width: auto;
  max-width: min(420px, 100%);
  max-height: min(62vh, 560px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: #8ec8ea;
  border-radius: 22px;
  box-shadow: 0 14px 0 rgba(22,49,92,.12), 0 0 0 4px #e6c15a;
}
.hero-card {
  position: relative;
  text-align: center;
  margin: 0 auto 18px;
  background: rgba(255,248,232,.94);
  border: 3px solid #e6c15a;
  border-radius: 24px;
  padding: 22px 24px 24px;
  max-width: 640px;
  box-shadow: 0 16px 0 rgba(22,49,92,.08);
}
.ribbon {
  display: inline-block; margin: 0 0 8px;
  background: var(--blue); color: #fff; font-weight: 800;
  padding: 6px 16px; border-radius: 4px 16px 4px 16px; font-size: .85rem;
}
.hero-card h1 {
  font-family: var(--title);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0 0 10px; color: #c9a227;
  text-shadow: 0 1px 0 #fff6c8;
}
.lede { font-size: 1.12rem; margin: 0 0 16px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block; font-weight: 800; border-radius: 999px; padding: 12px 18px;
  box-shadow: 0 5px 0 rgba(22,49,92,.15);
}
.btn.gold { background: linear-gradient(#fff1b0, var(--gold)); color: var(--ink); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.pink { background: linear-gradient(#ffd0e6, var(--pink)); color: #4a1230; }

.paper-strip, .stories, .play { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 36px 28px; }
.kicker { margin: 0 0 6px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; font-size: .75rem; color: var(--pink-deep); }
.stories h2, .play h2, .paper-card h2 { font-family: var(--title); font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 10px; }
.paper-card {
  display: grid; grid-template-columns: .95fr 1fr; gap: 22px; align-items: center;
  background: #fff; border-radius: 28px; padding: 16px; box-shadow: 0 18px 0 rgba(26,33,64,.06);
}
.paper-card img { width: 100%; height: auto; max-height: 320px; object-fit: contain; border-radius: 20px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.story {
  background: #fff; border-radius: 28px; overflow: hidden;
  box-shadow: 0 18px 0 rgba(26,33,64,.06);
  display: grid; grid-template-rows: 220px auto;
  transition: transform .2s ease;
}
.story:hover { transform: translateY(-6px); }
.story img { width: 100%; height: 220px; object-fit: contain; background: #8ec8ea; }
.story-meta { padding: 16px 18px 20px; }
.story-meta small { font-weight: 800; color: var(--pink-deep); }
.story-meta h3 { font-family: var(--title); margin: 4px 0 6px; font-size: 1.8rem; }
.story-meta p { margin: 0 0 10px; }
.read { font-weight: 800; color: var(--blue); }

/* the Play section headline gets to shout a bit */
.play .games-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.02;
  margin: 0 0 12px;
  color: #16315c;
  text-shadow: 0 3px 0 rgba(230, 193, 90, .45);
}

.stalls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.stall {
  background: #fff; border-radius: 24px; padding: 18px;
  box-shadow: 0 12px 0 rgba(26,33,64,.06);
}
.stall strong { display: block; font-size: 1.2rem; margin-bottom: 4px; }
.stall span { opacity: .75; }

.foot { text-align: center; padding: 18px 12px 40px; opacity: .7; }
.foot a { text-decoration: underline; }

/* inner pages stay readable */
body.inner { margin: 0; font-family: var(--ui); color: var(--ink);
  background: linear-gradient(180deg, var(--sky), var(--cream) 30%); min-height: 100dvh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; position: sticky; top: 0; z-index: 5;
  background: rgba(255,248,238,.85); backdrop-filter: blur(10px);
}
.topbar .crumb { display: flex; gap: 8px; align-items: center; }
.topbar a.back {
  font-weight: 800;
  background: #fff;
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(26,33,64,.08);
}
.topbar h1 { font-family: var(--title); font-size: 1.2rem; margin: 0; }
.spread {
  margin: 12px auto; max-width: 1180px; background: #fff;
  border-radius: 24px; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr;
  min-height: calc(100dvh - 150px);
  box-shadow: 0 24px 0 rgba(26,33,64,.06);
}
.spread.text-only { grid-template-columns: 1fr; }
.art-frame { margin: 0; background: #fff8ee; display: grid; place-items: center; min-height: 240px; }
.art-frame img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; }
.text-frame { padding: clamp(22px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; color: #1a2140; }
.verses p { font-family: var(--title); font-size: clamp(1.12rem, 2.1vw, 1.5rem); line-height: 1.45; margin: 0 0 .65em; color: #1a2140; }
.verses p.active { background: linear-gradient(transparent 60%, rgba(255,126,179,.45) 60%); }
.the-end { font-family: var(--title); font-size: 3rem; margin: 0 0 8px; }
.pager { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; max-width: 1180px; margin: 12px auto 24px; padding: 0 12px; }
.nav-btn, .icon-btn {
  width: 56px; height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 1.8rem; font-weight: 800;
  box-shadow: 0 6px 0 rgba(26,33,64,.08);
}
.icon-btn { width: 48px; height: 48px; font-size: 1rem; display: grid; place-items: center; }
.icon-btn.speaking { background: var(--pink); }
.nav-btn:disabled { opacity: .3; }
.dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.dots button { width: 9px; height: 9px; border: 0; border-radius: 99px; background: rgba(26,33,64,.2); padding: 0; cursor: pointer; }
.dots button.current { width: 20px; background: var(--pink-deep); }

.paper { max-width: 820px; margin: 20px auto 60px; padding: 0 16px; }
.edition {
  background: #fff; border-radius: 18px; padding: 22px; margin-bottom: 18px;
  box-shadow: 0 12px 0 rgba(26,33,64,.06);
}
.edition h2 { font-family: var(--title); margin: 0 0 6px; }
.edition time { opacity: .6; font-size: .85rem; }
.edition .photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.edition .photos img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; }
.admin-box { max-width: 640px; margin: 20px auto 80px; padding: 0 16px; }
.admin-box form, .login {
  background: #fff; border-radius: 18px; padding: 18px; display: grid; gap: 10px;
  box-shadow: 0 12px 0 rgba(26,33,64,.06);
}
input, textarea {
  background: var(--cream); color: var(--ink); border: 2px solid rgba(26,33,64,.1);
  border-radius: 12px; padding: 12px 14px; font-size: 1rem; font-family: inherit;
}
textarea { min-height: 140px; resize: vertical; }
.gold {
  background: linear-gradient(#fff0b8, var(--gold)); color: var(--ink);
  border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; cursor: pointer;
}
.danger { background: transparent; color: #c23; border: 1px solid #c23; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.preview { display: flex; gap: 8px; flex-wrap: wrap; }
.preview img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; }
.locked { opacity: .75; }

@media (max-width: 860px) {
  .hero, .paper-card, .story-grid, .stalls, .spread { grid-template-columns: 1fr; }
  .hero .cover { height: auto; }
  .hero-card { margin: 14px 0 0; }
  .spread { min-height: 0; }
  .art-frame img { height: 42vh; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .cover { animation: none; }
}

body.world { padding-bottom: 130px; }
.kingdom {
  position: fixed; left: 0; right: 0; bottom: 0; height: 120px;
  pointer-events: none; z-index: 8; overflow: hidden;
}
.grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 54px;
  background: linear-gradient(#8ed45a, #3f9a2c);
  box-shadow: 0 -4px 0 #e6c15a;
}
.stage { position: absolute; inset: 0; }
.actor {
  position: absolute; bottom: 18px; height: 88px; width: auto;
  filter: drop-shadow(0 6px 0 rgba(22,49,92,.15));
  border-radius: 18px; background: rgba(255,255,255,.88); padding: 4px;
}
.actor.tail { height: 64px; border-radius: 40%; padding: 3px; background: #fff; }
.actor.ride { height: 100px; }
.actor.wizard { height: 92px; }
.puff {
  position: absolute; bottom: 70px; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(160,230,90,.9), rgba(160,230,90,0));
  animation: puff .8s ease-out forwards; pointer-events: none;
}
@keyframes puff { to { transform: scale(2.2); opacity: 0; } }

/* Play reads as the one thing to press: deep blue, white text, raised. */
.big-play {
  background: linear-gradient(#2f6fc4, #1a4480) !important;
  color: #fff !important;
  border: 3px solid #123a70;
  border-radius: 16px;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 12px 34px;
  box-shadow: 0 6px 0 #0e2c56;
  cursor: pointer;
}

.big-play:hover { filter: brightness(1.08); }
.big-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #0e2c56; }

/* The Taily News masthead art */
.news-hero {
  display: block;
  width: min(760px, 92%);
  height: auto;
  margin: 14px auto 4px;
  border-radius: 22px;
  box-shadow: 0 14px 0 rgba(22, 49, 92, .12), 0 0 0 4px #e6c15a;
}

/* real gameplay shots on the game cards */
.stall img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  margin: 0 0 12px;
  background: #8ec8ea;
  box-shadow: 0 6px 0 rgba(22, 49, 92, .10);
}
.stall { transition: transform .18s ease; }
.stall:hover { transform: translateY(-4px); }

.game-card .game-shot {
  display: block;
  margin: 4px 0 14px;
}
.game-card .game-shot img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
  background: #8ec8ea;
  box-shadow: 0 10px 0 rgba(22, 49, 92, .10), 0 0 0 3px #e6c15a;
}
.game-card .game-shot:hover img { filter: brightness(1.04); }

/* the only house rule that matters */
.foot { opacity: 1; }
.foot .warn {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #16315c;
  background: #fff;
  border: 3px dashed #e6c15a;
  border-radius: 18px;
  padding: 12px 22px;
}

/* Play page: Tail Games! on a night-sky castle ground */
body.inner.games {
  color: #fff6e8;
  background:
    radial-gradient(circle at 50% -10%, #3a4a8c 0%, #1a2140 42%, #12162a 100%);
  min-height: 100dvh;
}
body.inner.games .topbar {
  background: rgba(18, 22, 42, .78);
  border-bottom: 3px solid #e6c15a;
  color: #fff6e8;
}
body.inner.games .topbar a.back { color: #fff6e8; }
body.inner.games .topbar h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: #e6c15a;
  letter-spacing: .02em;
}
body.inner.games .edition { color: #16315c; }
