/* The store teaser, in the game's own look (game/src/01-head.html): the tiled Glopton wall, the Concert Hall
   stage with its red curtains and boards, the plum shelf of tiles, Luckiest Guy over Fredoka, ink outlines and
   drop shadows. The tokens are the game's :root values (bible/palette.tsv game.* and town.* rows); the tile
   colours are the family rows (fam.*). */
@font-face { font-family: "Luckiest Guy"; src: url("/fonts/luckiest-guy-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --wall: #cfefe3; --grout: #b4dccb; --ink: #3b2a4a; --cream: #fff6e2; --paper: #fff6e2; --lime: #8bd34a;
  --floor1: #e9d5b0; --floor2: #d4ba8e; --shelf: #3b2a4a; --shelf-2: #4f3b66; --muted: #6b5a4d;
  --curtain: #b3313a; --curtain-2: #d94c55; --gold: #f2c12e; --genre: #2f7a5e; --fx: #1fa699;
  --cherry: #e8484a; --honey: #f2b134; --lilac: #c79bf2; --pond: #5fb3e6;
  --display: "Luckiest Guy", "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  --body: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --beat: .6s; /* 100 BPM */
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background-color: var(--wall);
  background-image: linear-gradient(var(--grout) 2px, transparent 2px), linear-gradient(90deg, var(--grout) 2px, transparent 2px);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
}
img { display: block; }
#app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  padding: 12px max(clamp(16px, 3vw, 48px), env(safe-area-inset-right, 0px)) 16px max(clamp(16px, 3vw, 48px), env(safe-area-inset-left, 0px));
}

/* header: the official wordmark where the game has its logo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.logo { margin: 0; line-height: 0; }
.logo img { height: clamp(64px, 9vw, 128px); width: auto; animation: wobble 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wobble { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg) translateY(-3px); } }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.where-chip { font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, .75); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.status { font-family: var(--display); letter-spacing: .03em; font-size: clamp(15px, 1.4vw, 19px); line-height: 1; border: 3px solid var(--ink); border-radius: 999px; padding: .6em 1em .45em; background: var(--lime); }   /* the game's status pill (.g-status.on), not a button */

/* the stage and the shelf side by side on a wide window, the shelf under the stage on a phone */
.play { display: flex; flex-direction: column; gap: clamp(8px, 1.2vh, 14px); flex: 1 1 auto; }
@media (min-width: 761px) {
  .play { display: grid; grid-template-columns: minmax(0, 1fr) clamp(228px, 18vw, 262px); gap: clamp(10px, 1.4vw, 20px); min-height: 460px; }
}

/* the stage: the Hall's curtains down both sides, the boards across the foot */
.stage-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(43, 29, 20, .25);
  container-type: inline-size;
}
.stage-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, var(--curtain) 0 14px, var(--curtain-2) 14px 22px, var(--curtain) 22px 36px),
    repeating-linear-gradient(90deg, var(--curtain) 0 14px, var(--curtain-2) 14px 22px, var(--curtain) 22px 36px);
  background-size: clamp(28px, 6%, 90px) 100%, clamp(28px, 6%, 90px) 100%;
  background-position: left top, right top;
  background-repeat: no-repeat;
  pointer-events: none;
}
.stage-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(40px, 7vh, 72px);
  background: repeating-linear-gradient(90deg, var(--floor1) 0 44px, var(--floor2) 44px 48px);
  border-top: 4px solid var(--ink);
  pointer-events: none;
}
.hint { position: absolute; top: 12px; left: 14px; right: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; padding-inline: clamp(20px, 5%, 80px); }
.hint span { background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-weight: 500; font-size: clamp(12px, 1.05vw, 15px); }
.hint .sign { background: var(--genre); color: #fff; font-family: var(--display); font-weight: 400; letter-spacing: .04em; }
.stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(58px, 9vh, 84px) clamp(32px, 7%, 100px) clamp(10px, 2vh, 20px);
}

/* the call: a bonus-card title over a tip bubble */
.call { text-align: center; max-width: 34em; }
.big {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 7cqi, 84px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--gold);
  text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 2px 2px var(--ink), -2px -2px var(--ink), 2px -2px var(--ink), -2px 2px var(--ink), 0 7px 0 var(--ink);
  animation: cardIn .6s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes cardIn { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.05) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.bubble {
  margin: 16px auto 0;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--ink);
  padding: 12px 20px 11px;
  font-weight: 600;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.35;
  text-wrap: balance;
}

/* the band and the stand: heights are bible heights (Principal Slidewell = 100) times --u */
.scene {
  --u: min(3.2px, calc(100cqi * .84 / 290), calc((100svh - 400px) / 130));
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(2 * var(--u));
  margin-bottom: clamp(30px, 3.4vw, 40px);   /* room on the boards for the name plates, which hang below the feet */
}
.member { position: relative; }
.char { position: relative; }
.char::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 0; height: 5%; border-radius: 50%; background: rgba(43, 29, 20, .2); z-index: -1; }
.char img {
  height: calc(var(--h) * var(--u));
  width: auto;
  transform-origin: 50% 100%;
  animation: bop var(--beat) ease-in-out infinite alternate;
  animation-delay: var(--off, 0s);
}
.jiggy { --h: 52; }
.quinn { --h: 66; --off: calc(var(--beat) * -1); }
.bea { --h: 80; }
@keyframes bop { from { transform: scale(1.035, .955); } to { transform: translateY(-5%) scale(.975, 1.03); } }
.name {
  font-family: var(--display);
  font-size: clamp(10px, 1vw, 15px);
  letter-spacing: .03em;
  line-height: 1.1;
  padding: .35em .6em .15em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cherry);
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.stall { width: calc(118 * var(--u)); height: calc(123 * var(--u)); margin-left: calc(4 * var(--u)); overflow: visible; }
.stall .sign { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 2.4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.note {
  position: absolute;
  bottom: 55%;
  font-size: clamp(18px, 2.6cqi, 28px);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  animation: float 3.6s ease-out infinite;
}
.n1 { left: 12%; --dx: -18px; }
.n2 { left: 28%; --dx: 22px; animation-delay: 1.2s; }
.n3 { left: 42%; --dx: -10px; animation-delay: 2.4s; }
@keyframes float {
  0% { opacity: 0; transform: translate(0, 0) rotate(-10deg); }
  15% { opacity: .9; }
  70%, 100% { opacity: 0; transform: translate(var(--dx), -140px) rotate(12deg); }
}

/* the shelf: the game's roster panel, its tiles locked like a locked member in the picker */
.shelf {
  background: var(--shelf);
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 14px clamp(12px, 1.6vw, 22px) 16px;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 0 rgba(43, 29, 20, .3);
}
.shelf-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.shelf-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(17px, 1.6vw, 22px); letter-spacing: .04em; line-height: 1; }
.shelf-head span { font-size: 13px; opacity: .8; font-weight: 500; }
.icons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
@media (min-width: 761px) { .icons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ico {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--c, var(--cream));
  padding: 4px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 4px 0 #1d120b;
  min-width: 0;
  container-type: inline-size;
}
.ico .q, .ico img { width: 100%; height: auto; aspect-ratio: 200 / 188; }
.ico img { object-fit: contain; padding: 8% 0 2%; }
.ico .q {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 58cqi;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}
.ico .nm {
  font-family: var(--display);
  font-size: clamp(9px, 15.5cqi, 13px);
  letter-spacing: .02em;
  line-height: 1;
  height: 2em;
  display: flex;
  align-items: center;
  color: #fff;
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, .45);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.ico.locked .q { opacity: .55; }
.ico.locked::after { content: ""; position: absolute; top: 4px; right: 4px; width: 24px; height: 30px; background: url("/img/lock.svg") center / contain no-repeat; }
.ico.mark { --c: var(--cream); }
.ico.mark .nm { color: var(--cream); }
.cherry { --c: var(--cherry); }
.honey { --c: var(--honey); }
.lime { --c: var(--lime); }
.lilac { --c: var(--lilac); }
.pond { --c: var(--pond); }
.shelf-note { margin: auto 0 0; font-size: 13px; font-weight: 500; opacity: .85; line-height: 1.35; }

.foot { font-size: 12px; color: #2f4a4c; text-align: center; line-height: 1.4; }
.foot p { margin: 0; }

/* the game's button (.btn): the teaser's "Team log in", the store's way back */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: .03em;
  line-height: 1;
  padding: .6em 1em .45em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .logo a:focus-visible { outline: 3px solid var(--fx); outline-offset: 3px; }
.logo a { display: inline-block; border-radius: 12px; }

/* the store, team preview: the game's cream card (.book) holding the shelf and its cards */
.book {
  flex: 1 1 auto;
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 30px;
  padding: clamp(16px, 2.5vw, 28px);
  box-shadow: 0 10px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.book > h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); letter-spacing: .03em; line-height: 1; }
.book .lead { margin: 0; max-width: 70ch; line-height: 1.4; font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; color: var(--ink); padding: 10px 12px 12px; min-width: 0; }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .03em; line-height: 1.05; text-decoration: underline 4px var(--c, var(--gold)); text-underline-offset: 3px; text-decoration-skip-ink: none; }
.card p { margin: 0; font-size: 13px; line-height: 1.35; }
.card.empty { background: rgba(255, 255, 255, .12); border: 3px dashed var(--cream); color: var(--cream); min-height: 140px; justify-content: center; align-items: center; text-align: center; }
.steps h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .03em; }
.steps ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; line-height: 1.4; font-weight: 500; }

/* trust badges: white cards with an ink outline and drop shadow, an icon in the game's style beside a
   Luckiest Guy title; the to-do card is dashed like an empty riser */
.trust h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .03em; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.badge { display: flex; align-items: center; gap: 12px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); padding: 10px 14px; min-width: 0; }
.badge img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.badge b { display: block; font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .03em; line-height: 1.1; }
.badge span { display: block; font-size: 13px; line-height: 1.35; margin-top: 2px; }
.badge.todo { background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); }

/* "Store under construction": the public front page since 2026-11-02 (operator), in the game's look -
   a giant gold Luckiest Guy title between caution-tape stripes (the game's gold and ink), the Trembleys
   by their Jam Stand standing on the Concert Hall boards */
.build {
  flex: 1 1 auto;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(10px, 1.8vh, 18px);
  padding-top: clamp(14px, 3vh, 32px);
}
.build-mark { width: min(440px, 74vw); height: auto; animation: wobble 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
.tape {
  width: min(1100px, 100%);
  height: clamp(22px, 3vw, 34px);
  border: 4px solid var(--ink);
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 26px, var(--ink) 26px 52px);
  box-shadow: 0 5px 0 rgba(43, 29, 20, .25);
}
.big.huge { font-size: clamp(40px, 7cqi, 112px); line-height: .95; }   /* one line on a wide screen, wraps on a phone */
.build .bubble { margin: 0; }
/* the band fits the width, and the height left under the title, but never shrinks below 1.4px a unit */
.build-scene { --u: min(2.2px, calc(100cqi * .84 / 290), max(1.4px, calc((100svh - 600px) / 125))); margin-top: auto; margin-bottom: -18px; }
.boards {
  align-self: stretch;
  height: clamp(28px, 5vh, 52px);
  border: 4px solid var(--ink);
  border-radius: 14px;
  background: repeating-linear-gradient(90deg, var(--floor1) 0 44px, var(--floor2) 44px 48px);
}
.foot .team { color: var(--muted); font-weight: 600; }
.foot .team:focus-visible { outline: 3px solid var(--fx); outline-offset: 3px; border-radius: 4px; }

/* "Team only!": what a visitor sees after cancelling the sign-in prompt */
.locked-page { justify-content: center; align-items: center; }
.card-big {
  text-align: center;
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 30px;
  padding: clamp(20px, 4vw, 40px);
  width: min(560px, 100%);
  box-shadow: 0 10px 0 var(--ink);
  animation: cardIn .6s cubic-bezier(.2, 1.5, .4, 1);
}
.card-big .bubble { margin-bottom: 22px; }

@media (max-width: 760px) {
  .stage { padding-inline: 36px; }
  .status { font-size: 14px; }
  .note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .note { display: none; }
}
