/* The QuinnLab look, shared by new games: sky, chunky buttons, cards and the creature picker. */
:root {
  --ink: #2b2350;
  --sun: #ffd23f;
  --card: #ffffff;
  --radius: 22px;
  --main: #ff5fa2;
  --on-main: #fff;
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
/* Phones: no text blow-up when turned sideways, no grey flash on tap, and no zoom on a quick double tap. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
a, button, label, input, select, textarea { touch-action: manipulation; }
body {
  min-height: 100vh;
  background: linear-gradient(#7fd4ff 0%, #c9efff 55%, #eafaff 100%);
  overflow-x: hidden;
}

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.sun {
  position: absolute; top: 34px; right: 9%;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd23f 55%, #ffab1f);
  box-shadow: 0 0 0 14px rgba(255, 226, 120, .28), 0 0 0 32px rgba(255, 226, 120, .16), 0 0 70px 30px rgba(255, 220, 110, .5);
}
.cloud {
  position: absolute; left: -200px;
  width: 160px; height: 50px; border-radius: 50px;
  background: linear-gradient(#fff 55%, #dcefff);
  opacity: .9;
  animation: drift 70s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 70px; height: 70px; left: 22px; top: -34px; }
.cloud::after { width: 56px; height: 56px; left: 78px; top: -24px; }
.c1 { top: 9%; }
.c2 { top: 24%; animation-duration: 95s; animation-delay: -40s; transform: scale(.7); }
.c3 { top: 5%; animation-duration: 120s; animation-delay: -80s; transform: scale(1.2); }
@keyframes drift { to { left: 110%; } }

/* ---------- Type ---------- */
.logo {
  margin: 12px 0 26px;
  text-align: center;
  font-size: clamp(46px, 8vw, 84px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--ink), 0 4px 0 var(--ink), 0 6px 0 var(--ink), 0 8px 0 var(--ink),
    0 10px 0 #1c1638, 0 18px 22px rgba(43, 35, 80, .35);
  transform: perspective(600px) rotateX(14deg);
}
.logo .accent { color: var(--sun); }
.tagline { text-align: center; font-size: 20px; font-weight: 700; margin: 0 0 22px; }
.field-label { display: block; font-weight: 800; font-size: 15px; margin: 12px 0 6px; }

/* ---------- Controls ---------- */
.btn {
  font: inherit; font-weight: 900; font-size: 18px;
  color: var(--ink);
  background-color: var(--sun);
  background-image: linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 48%, rgba(0, 0, 0, .1));
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 10px 20px;
  box-shadow: 0 6px 0 var(--ink), 0 12px 14px rgba(43, 35, 80, .22);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink), 0 16px 18px rgba(43, 35, 80, .24); }
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink), 0 2px 4px rgba(43, 35, 80, .2); }
.btn:focus-visible { outline: 4px solid #fff; outline-offset: 2px; }
.btn.big { font-size: 24px; padding: 14px 30px; }
.btn.small { font-size: 15px; padding: 6px 14px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.btn.ghost { background-color: #fff; }

.name-input {
  width: 100%;
  font: inherit; font-weight: 800; font-size: 22px;
  color: var(--ink);
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 4px 0 rgba(43, 35, 80, .1);
  outline: none;
}
.name-input:focus { box-shadow: 0 0 0 5px var(--sun); }
.name-input::placeholder { color: #b9b5d3; }
.name-input.wobble { animation: wobble .4s; }
@keyframes wobble { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.card {
  margin: 0;
  min-width: 0;
  background: linear-gradient(#fff, #f3f0ff);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px 20px 20px;
  box-shadow: 0 10px 0 var(--ink), 0 26px 32px rgba(43, 35, 80, .25);
}
.card > legend {
  padding: 4px 16px;
  border-radius: 999px;
  color: var(--on-main);
  background: var(--main);
  font-weight: 900; font-size: 18px;
  border: 3px solid var(--ink);
}

.home-link {
  position: absolute; left: 20px; top: 16px; z-index: 3;
  padding: 6px 14px;
  font-size: 15px; font-weight: 900; color: var(--ink); text-decoration: none;
  background: rgba(255, 255, 255, .85);
  border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
}
@media (hover: hover) { .home-link:hover { background: var(--sun); } }

/* ---------- Creature picker (shared/creature-picker.js) ---------- */
.colour-msg { margin: 6px 0 0; font-size: 14px; font-weight: 800; color: #6b6690; min-height: 20px; }
.colour-msg.good { color: #2b9a3f; }
.colour-msg.bad { color: #c92a2a; }
.shade-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 800; color: #6b6690; }
.shade-row input { flex: 1; min-width: 0; accent-color: var(--main); }
.hero-pick { margin-top: 4px; }
.hero-stand { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.hero-preview { width: 104px; height: 113px; animation: bob 1.6s ease-in-out infinite; }
.kind-name { font-size: 22px; font-weight: 900; }
.hero-svg svg, .hero-preview svg, .kinds svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-preview svg, .hero-svg svg { animation: turn 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
.kinds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kinds label { cursor: pointer; min-width: 0; }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds span {
  display: block;
  aspect-ratio: 1 / 1.08;
  padding: 4px;
  border: 3px solid #d9d5ee;
  border-radius: 14px;
  background: #f6f4ff;
  transition: transform .12s;
}
@media (hover: hover) { .kinds label:hover span { transform: scale(1.08); } }
.kinds input:checked + span { border-color: var(--ink); background: var(--sun); transform: scale(1.08); }
.kinds input:focus-visible + span { box-shadow: 0 0 0 4px var(--ink); }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes turn {
  0%, 100% { transform: perspective(300px) rotateY(-16deg); }
  50% { transform: perspective(300px) rotateY(16deg); }
}

/* Keyboard hints mean nothing on a touch screen. */
@media (hover: none) and (pointer: coarse) { kbd { display: none !important; } }

.screen { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cloud, .hero-preview, .hero-preview svg, .hero-svg svg { animation: none; }
}
