/* Public home (PLAY_PUBLIC=1). Phone portrait first; plain CSS plus original site art served from the media tree. */
@font-face {
  font-family: "Proxima Nova"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/sites/default/themes/club_penguin/fonts/ProximaNova-Reg-webfont.woff2") format("woff2");
}
@font-face {
  font-family: "Proxima Nova"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/sites/default/themes/club_penguin/fonts/ProximaNova-Bold-webfont.woff2") format("woff2");
}

:root {
  --blue: #0b5db8; --blue-dk: #064a96; --navy: #06213f; --sky: #57b3f1;
  --gold: #ffcc00; --gold-dk: #b97f00; --ink: #0a2a50; --muted: #4d6f97;
  --card: #ffffff; --line: #cfe3f7; --err: #b3261e; --ok: #1c7c35;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: #e9eef8;
  font: 16px/1.45 "Proxima Nova", "Helvetica Neue", Arial, system-ui, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* The 2017 site's snowy island backdrop, fading into snow. */
.sky {
  position: fixed; inset: 0 0 auto 0; height: 100vh; z-index: -1;
  background: url("/assets/Evergreen-Background_6-1417729740_1.jpg") center top / cover no-repeat, var(--sky);
}
.sky::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(233, 238, 248, 0) 45%, #e9eef8 100%);
}

/* ---- hero ---- */
.hero { text-align: center; padding: 22px 16px 8px; }
.logo { margin: 0 auto; width: min(78vw, 340px); aspect-ratio: 365 / 140; overflow: hidden; }
.logo img { display: block; width: 100%; height: auto; margin-top: -11.5%; } /* crops the parent-brand line above the wordmark */
.welcome {
  margin: 10px auto 18px; max-width: 30ch; font-size: 19px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 0 rgba(6, 33, 63, .55), 0 0 14px rgba(6, 33, 63, .45);
}
a.play {
  display: inline-block; min-width: 200px; padding: 14px 40px; border-radius: 999px; border: 4px solid #fff;
  color: var(--navy); text-decoration: none; font-size: 28px; font-weight: 700; letter-spacing: .5px;
  background: linear-gradient(180deg, #ffe35c 0%, var(--gold) 55%, #f2a900 100%);
  box-shadow: 0 6px 0 var(--gold-dk), 0 12px 26px rgba(6, 33, 63, .35);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
a.play:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--gold-dk), 0 16px 30px rgba(6, 33, 63, .4); }
a.play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-dk), 0 6px 14px rgba(6, 33, 63, .3); }
a.play:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
a.play.small { font-size: 22px; min-width: 160px; padding: 10px 30px; }

.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 6px 14px; border-radius: 999px;
  background: rgba(6, 33, 63, .55); color: #fff; font-size: 14px;
}
.status i { width: 9px; height: 9px; border-radius: 50%; background: #9bb; }
.status.on i { background: #3ddc5b; box-shadow: 0 0 6px #3ddc5b; }
.status.off i { background: #ff6a5f; }

/* ---- cards ---- */
.cards { display: grid; gap: 16px; max-width: 980px; margin: 18px auto 0; padding: 0 16px; }
.card {
  background: var(--card); border-radius: var(--radius); border: 3px solid var(--line);
  box-shadow: 0 8px 24px rgba(6, 33, 63, .14); padding: 18px 16px 20px;
}
.card h2 { margin: 0 0 14px; font-size: 24px; color: var(--blue-dk); }

.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 700; margin: 0 0 6px; padding: 0; }
.field legend span { font-weight: 400; color: var(--muted); margin-left: 6px; }
input[type=text], input[type=password] {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); padding: 11px 13px; border-radius: 12px;
  border: 2px solid #b9d5f2; background: #fff; appearance: none;
}
input[type=text]:focus, input[type=password]:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 93, 184, .18); }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.pass { display: flex; gap: 8px; }
.pass input { flex: 1; min-width: 0; }
button.show {
  font: inherit; font-weight: 700; font-size: 15px; color: var(--blue); background: #eef6ff; border: 2px solid #b9d5f2;
  border-radius: 12px; padding: 0 14px; cursor: pointer;
}

/* 16 classic penguin colours (paper items 1-16, player_colors.json) */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px;
  border-radius: 12px; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sw .dot { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #c3d8ee; transition: transform .1s; }
.sw .nm { font-size: 12px; line-height: 1.15; color: var(--muted); }
.sw:hover .dot { transform: scale(1.08); }
.sw input:checked + .dot { box-shadow: 0 0 0 3px var(--blue), 0 0 0 6px rgba(255, 204, 0, .7); transform: scale(1.08); }
.sw input:checked ~ .nm { color: var(--ink); font-weight: 700; }
.sw input:focus-visible + .dot { outline: 3px solid var(--blue); outline-offset: 4px; }
.c1 { background: #003366; } .c2 { background: #009900; } .c3 { background: #ff3399; } .c4 { background: #333333; }
.c5 { background: #cc0000; } .c6 { background: #ff6600; } .c7 { background: #ffcc00; } .c8 { background: #660099; }
.c9 { background: #996600; } .c10 { background: #ff6666; } .c11 { background: #006600; } .c12 { background: #0099cc; }
.c13 { background: #8ae302; } .c14 { background: #93a0a4; } .c15 { background: #02a797; } .c16 { background: #f0f0d8; }

.age { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; font-weight: 700; cursor: pointer; }
.age input { width: 24px; height: 24px; margin: 0; accent-color: var(--blue); flex: none; }

button.go {
  width: 100%; font: inherit; font-size: 20px; font-weight: 700; color: #fff; background: var(--blue); border: 0;
  border-radius: 14px; padding: 14px 18px; cursor: pointer; box-shadow: 0 4px 0 var(--blue-dk);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button.go:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-dk); }
button.go:disabled { opacity: .6; cursor: progress; }
.msg { min-height: 22px; margin: 12px 0 0; font-weight: 700; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

.done { text-align: center; padding: 8px 0 4px; }
.done-title { font-size: 22px; margin: 0 0 6px; }
button.link { font: inherit; color: var(--blue); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; }

.rules ul { margin: 0; padding: 0 0 0 20px; }
.rules li { margin: 0 0 10px; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.foot { max-width: 760px; margin: 26px auto 0; padding: 0 16px 28px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---- larger screens ---- */
@media (min-width: 640px) {
  .hero { padding-top: 34px; }
  .welcome { font-size: 22px; max-width: 36ch; }
  .card { padding: 22px 24px 24px; }
  .swatches { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  button.go { width: auto; min-width: 240px; }
}
@media (min-width: 900px) {
  .cards { grid-template-columns: 3fr 2fr; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
