/* Royal Playground Studios
   Lilita One, Press Start 2P, and Nunito are SIL Open Font License.
   License texts live in /assets/fonts/. */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/lilita-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-650.woff2") format("woff2");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/press-start-2p.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --ink: #140e0a;
  --gold: #c4a574;
  --gold-2: #e7cc96;
  --purple: #4c1d95;
  --purple-shine: #8b5cf6;
  --cyan: #2de2ff;
  --cyan-deep: #0e4a5c;
  --pink: #ff3d8a;
  --pink-deep: #9d174d;
  --pink-soft: #ff8fbe;
  --cream: #f5f2eb;
  --cream-2: #f4efe4;
  --muted: #d4cfc4;
  --paper: #f4efe4;
  --shadow: 6px 6px 0 #000;
  --line: 4px solid var(--ink);
  --radius: 22px;
  --hud: 1080px;
  --font-display: "Lilita One", "Arial Black", "Arial Rounded MT Bold", sans-serif;
  --font-body: "Nunito", "Trebuchet MS", sans-serif;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body {
  min-height: 100%;
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--cream);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at -8% -10%, rgba(139, 61, 255, 0.34), transparent 55%),
    radial-gradient(720px 480px at 108% -6%, rgba(255, 61, 138, 0.18), transparent 50%),
    radial-gradient(680px 420px at 80% 110%, rgba(45, 226, 255, 0.09), transparent 46%),
    linear-gradient(rgba(245, 242, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 242, 235, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 22px 22px, 22px 22px;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

p,
dd {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 80;
  background: var(--gold);
  color: var(--ink);
  border: var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-display);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.pixel {
  width: 26px;
  height: 22px;
  flex: none;
}

.crown {
  width: 100%;
  height: auto;
}

/* HUD */

.hud {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-2);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 6px 0 #000;
}

.hud__row {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand toggle" "xp xp";
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0 10px;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: min(240px, calc(100vw - 112px));
  height: auto;
}

.nav-toggle {
  grid-area: toggle;
  justify-self: end;
  width: 48px;
  height: 48px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--gold);
  box-shadow: 3px 3px 0 #000;
  display: grid;
  place-items: center;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -7px;
}

.nav-toggle__bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #1a1428;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 10px 0 #000;
  padding: 6px 16px 16px;
  z-index: 50;
}

.nav.is-open {
  display: grid;
}

.nav a {
  margin-top: 8px;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--cream);
  background: #120c20;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 #000;
}

.nav a:hover,
.nav a[aria-current="true"] {
  background: var(--gold);
  color: var(--ink);
}

.xp {
  grid-area: xp;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.xp__lv,
.xp__pct {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.4;
  color: var(--gold-2);
  white-space: nowrap;
}

.xp__track {
  flex: 1;
  height: 16px;
  min-width: 64px;
  background: var(--bg);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--gold);
  overflow: hidden;
}

.xp__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0.06);
  transform-origin: left center;
  background: linear-gradient(180deg, #6FB35F 0 35%, #4E8F4A 35%);
}

/* Hero */

.hero {
  padding: 32px 0 12px;
}

.hero__grid {
  display: grid;
  gap: 28px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--cyan);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.35rem, 9vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  padding-bottom: 10px;
}

.mark {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  padding: 0 0.16em 0.02em;
  border: 3px solid var(--ink);
  border-radius: 0.18em;
  box-shadow: 4px 4px 0 var(--pink);
  line-height: 0.9;
  transform: rotate(-2deg);
}

.lede {
  margin-top: 14px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero .lede {
  color: var(--cream);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 18px;
  border: var(--line);
  border-radius: 14px;
  text-decoration: none;
  line-height: 1;
  box-shadow: var(--shadow);
}

.btn--start {
  font-family: var(--font-pixel);
  font-size: clamp(0.68rem, 3.1vw, 0.82rem);
  letter-spacing: 0.02em;
  background: var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow), inset 0 5px 0 #f3e2c0;
  white-space: nowrap;
}

.btn--cyan {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  background: var(--cyan);
  color: var(--ink);
  box-shadow: var(--shadow), inset 0 5px 0 #e7fdff;
}

.btn--pink {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.28rem;
  background: var(--pink-soft);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--pink-deep), inset 0 5px 0 #ffe0ee;
}

.btn--gold {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  background: var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow), inset 0 5px 0 #f3e2c0;
  width: 100%;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.caret {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  animation: blink 1s steps(1, end) infinite;
}

.select {
  background: #1b1230;
  border: var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow), inset 0 12px 0 var(--gold);
  padding: 26px 16px 16px;
}

.select__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.select__label {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--gold-2);
}

.select__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.select__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--cream);
  background: #120c20;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 #000;
}

.select__n {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--cyan);
  width: 2.2rem;
  flex: none;
}

.select__list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1;
}

.select__list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.select__stage {
  display: grid;
  justify-items: center;
  margin: 16px 0 8px;
}

.select__stage .crown-lg {
  width: 112px;
  height: 92px;
  animation: bob 2.6s ease-in-out infinite;
}

.select__who {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.6;
  color: var(--gold-2);
}

/* Sections */

.section {
  padding: 56px 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 8px 12px;
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--gold);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--pink);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.section > .wrap > .lede,
.achieve + .lede {
  margin-bottom: 22px;
}

.modes,
.carts,
.saves {
  display: grid;
  gap: 18px;
}

.mode {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 26px 18px 18px;
  color: var(--cream);
  text-decoration: none;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 10px 0 var(--shine);
}

.mode--game {
  --shine: var(--purple-shine);
  background: var(--purple);
}

.mode--wp {
  --shine: #67e8f9;
  background: var(--cyan-deep);
}

.mode--shop {
  --shine: var(--pink-soft);
  background: var(--pink-deep);
}

.mode__icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--cream);
  border: var(--line);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}

.mode__icon svg {
  width: 44px;
  height: 44px;
}

.mode h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  line-height: 1;
  margin-bottom: 8px;
}

.mode p {
  color: var(--cream);
}

.mode__go {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  border-bottom: 3px solid var(--gold);
  align-self: flex-start;
}

/* Workshop cartridges */

#workshop {
  background: #101014;
}

.cart {
  width: min(100%, 360px);
  height: 100%;
  justify-self: center;
  display: flex;
  filter: drop-shadow(6px 8px 0 #000);
}

.cart__shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: var(--line);
  border-radius: 18px 18px 12px 12px;
  padding: 12px 12px 0;
  box-shadow: inset 0 10px 0 var(--shell-shine);
}

.cart--gray {
  --shell: #9aa3ae;
  --shell-shine: #d5dbe3;
  background: transparent;
}

.cart--gray .cart__shell {
  background: var(--shell);
}

.cart--purple .cart__shell {
  background: #6d28d9;
  --shell-shine: #c4b5fd;
}

.cart--black .cart__shell {
  background: #2a2a30;
  --shell-shine: #5c5c66;
}

.cart__label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 12px;
}

.cart__code {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.art {
  aspect-ratio: 16 / 10;
  border: 3px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #17171b;
}

.art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cart h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
}

.cart__label p {
  font-size: 1rem;
}

.cart__status {
  margin-top: auto;
  text-align: center;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.3;
  background: var(--pink-soft);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

.cart__grip {
  height: 46px;
  margin-top: 12px;
  border-top: 4px solid var(--ink);
  border-radius: 0 0 8px 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.38) 0 12px,
    transparent 12px 26px
  );
}

/* Save files */

.save {
  min-width: 0;
  background: #1a1424;
  border: var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow), inset 0 10px 0 var(--gold);
  padding: 26px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save--open {
  box-shadow: var(--shadow), inset 0 10px 0 var(--cyan);
}

.save__slot {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.5;
  color: var(--gold-2);
}

.save h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
}

.save dl {
  display: grid;
  gap: 12px;
}

.save dt {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.5;
  color: var(--cyan);
  margin-bottom: 4px;
}

.save--open .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Media */

.broadcast {
  display: grid;
  gap: 22px;
  background: #16121c;
  border: var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow), inset 0 12px 0 var(--pink);
  padding: 28px 16px 18px;
}

.finder {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(45, 226, 255, 0.08), transparent 40%),
    #120c18;
  border: var(--line);
  border-radius: 16px;
  box-shadow: inset 0 0 0 3px var(--pink), 5px 5px 0 #000;
}

.finder__rec,
.finder__meta {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.finder__rec {
  color: var(--pink-soft);
}

.finder__meta {
  color: var(--cyan);
}

.finder__center {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  line-height: 0.9;
  text-align: center;
}

.rec {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--ink);
  animation: blink 1.15s steps(1, end) infinite;
}

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--cream);
}

.corner--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.corner--tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.corner--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.corner--br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.fine {
  margin-top: 12px;
  color: var(--muted);
}

.fine a,
.mail {
  color: var(--gold-2);
  font-weight: 800;
}

/* Contact */

.quest {
  display: grid;
  gap: 22px;
}

.form-panel {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: var(--line);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--gold);
  padding: 18px 16px 16px;
}

.form-panel h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 6px;
}

.form-note {
  margin-bottom: 14px;
  font-size: 0.98rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: #fffdf8;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  box-shadow: 3px 3px 0 #000;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5c564e;
  opacity: 1;
}

.field input:-webkit-autofill,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #fffdf8 inset;
}

.form-panel a {
  color: var(--purple);
  font-weight: 800;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.form-status:empty {
  display: none;
}

.form-status {
  margin-top: 12px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  font-weight: 800;
}

.form-status.is-error {
  background: #ffd0e4;
}

.form-status.is-ok {
  background: #c6f6ff;
}

/* Footer */

.foot {
  border-top: 4px solid var(--gold);
  background: #101014;
  padding: 28px 0 36px;
  box-shadow: inset 0 6px 0 #000;
}

.foot__grid {
  display: grid;
  gap: 14px;
}

.foot__name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.foot nav a {
  font-weight: 800;
  color: var(--gold-2);
}

.foot__note {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  line-height: 1.7;
  color: var(--pink-soft);
  max-width: 28rem;
}

.foot__copy {
  color: var(--muted);
}

.mail {
  overflow-wrap: anywhere;
}

/* 404 */

.wrong {
  padding: 48px 0 72px;
}

.wrong__code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(5.5rem, 22vw, 10rem);
  line-height: 0.85;
  color: var(--gold);
  text-shadow: 6px 6px 0 var(--pink), 12px 12px 0 var(--ink);
  padding: 0 4px 10px 0;
}

.wrong h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 4rem);
  line-height: 0.95;
  margin: 8px 0 12px;
}

.wrong .lede {
  color: var(--cream);
  margin-bottom: 20px;
}

/* Desktop */

@media (min-width: 720px) {
  .section {
    padding: 76px 0;
  }

  .saves {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

@media (min-width: 860px) {
  .broadcast {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding: 32px 28px 28px;
  }

  .carts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .cart {
    width: 100%;
  }
}

@media (min-width: 980px) {
  .hero {
    padding-top: 48px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    align-items: center;
    gap: 36px;
  }

  .modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quest {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }
}

@media (max-width: 559px) {
  .hero__actions .btn {
    width: 100%;
  }

  .save--open .btn {
    width: 100%;
  }
}

.hud--simple .hud__row {
  grid-template-areas: "brand xp";
  grid-template-columns: minmax(0, 1fr) auto;
}

.hud--simple .brand img {
  width: min(240px, 70vw);
}

@media (min-width: 1080px) {
  .hud__row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav xp";
    gap: 16px 20px;
    padding: 8px 0;
  }

  .nav-toggle {
    display: none;
  }

  .brand img {
    width: 250px;
  }

  .nav {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    grid-area: nav;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .nav a {
    margin-top: 0;
    min-height: 44px;
    padding: 8px 10px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-size: 1.15rem;
    border-radius: 12px;
  }

  .nav a:hover,
  .nav a[aria-current="true"] {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 #000;
  }

  .xp {
    width: 230px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn,
  .mode,
  .select__list a,
  .cart,
  .nav a {
    transition:
      transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
      box-shadow 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
      background 0.15s linear;
  }

  .btn:hover {
    transform: translate(-3px, -4px);
  }

  .btn--start:hover,
  .btn--gold:hover,
  .btn--cyan:hover {
    box-shadow: 9px 10px 0 #000, inset 0 5px 0 rgba(255, 255, 255, 0.45);
  }

  .btn--pink:hover {
    box-shadow: 9px 10px 0 var(--pink-deep), inset 0 5px 0 #ffe0ee;
  }

  .mode:hover,
  .select__list a:hover {
    transform: translate(-3px, -5px);
  }

  .mode:hover {
    box-shadow: 10px 12px 0 #000, inset 0 10px 0 var(--shine);
  }

  .select__list a:hover {
    box-shadow: 7px 8px 0 #000;
  }

  .cart:hover {
    transform: translateY(-8px);
  }

  .nav a:hover {
    transform: translate(-2px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Hanging sign logo */
.brand {
  position: relative;
  align-self: stretch;
  width: 64px;
  min-height: 64px;
  z-index: 5;
}
.brand::before,
.brand::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 10%, #cfcac0 22%, #8d8a84 52%, #3a3834 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,0.7), 0 0 0 1.5px #1F1602;
  z-index: 2;
}
.brand::before { left: 4px; }
.brand::after { left: calc(var(--sign-w) - 13px); }
.brand { --sign-h: 92px; --sign-w: 52px; --drop: 20px; --tuck: 0.52; --tuck-y: -14px; }
.sign {
  position: absolute;
  top: calc(10px + var(--drop));
  left: 0;
  display: block;
  width: var(--sign-w);
  transform-origin: 50% calc(-1 * var(--drop));
  rotate: -2.5deg;
  animation: sign-swing 5.5s ease-in-out infinite;
  transition: scale 0.35s ease, translate 0.35s ease, rotate 0.35s ease;
}
.brand::before,
.brand::after,
.sign__rope {
  transition: opacity 0.25s ease;
}
.sign__rope {
  position: absolute;
  bottom: calc(100% - 10px);
  width: 4px;
  height: calc(var(--drop) + 4px);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.35), transparent 35%, rgba(255,255,255,0.18) 55%, rgba(0,0,0,0.4)),
    repeating-linear-gradient(-58deg, #e6cb98 0 1.5px, #a57d45 1.5px 3.5px, #6a4b26 3.5px 4.5px);
  box-shadow: 1.5px 1px 0 rgba(0, 0, 0, 0.6);
}
.sign__rope--l { left: 6px; transform: rotate(1.5deg); }
.sign__rope--r { right: 6px; transform: rotate(-1.5deg); }
.brand .sign img {
  display: block;
  width: var(--sign-w);
  height: auto;
  margin: 0;
  filter:
    drop-shadow(0 0 10px rgba(0, 176, 236, 0.3))
    drop-shadow(5px 9px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 14px 14px rgba(0, 0, 0, 0.45));
}
.brand:hover .sign img,
.brand:focus-visible .sign img {
  filter:
    drop-shadow(0 0 14px rgba(0, 176, 236, 0.55))
    drop-shadow(5px 9px 0 rgba(0, 0, 0, 0.55))
    drop-shadow(0 14px 14px rgba(0, 0, 0, 0.45));
}
@keyframes sign-swing {
  0%, 100% { rotate: -2.5deg; }
  50% { rotate: 2deg; }
}
@media (prefers-reduced-motion: reduce) {
  .sign { animation: none; transition: none; }
  .brand::before, .brand::after, .sign__rope { transition: none; }
}
.hud .xp { margin-left: 76px; }
.hero, main > section:first-child { padding-top: 56px; }
@media (min-width: 1080px) {
  .brand { --sign-h: 132px; --sign-w: 75px; --drop: 16px; --tuck: 0.43; --tuck-y: -14px; width: 80px; }
  .hud .xp { margin-left: 0; }
  .hero, main > section:first-child { padding-top: 104px; }
}
main.wrong { padding-top: 140px; }
@media (min-width: 1080px) { main.wrong { padding-top: 150px; } }

/* Robust sign sizing (iOS Safari) */
.hud .brand { flex: 0 0 auto; max-width: 84px; overflow: visible; }
.hud .brand picture { display: block; width: var(--sign-w); max-width: var(--sign-w); }
.hud .brand .sign img,
.hud.hud--simple .brand .sign img {
  width: var(--sign-w) !important;
  max-width: var(--sign-w) !important;
  height: auto !important;
  max-height: calc(var(--sign-w) * 1.8) !important;
  aspect-ratio: 45 / 80;
  object-fit: contain;
}
