:root {
  --ink: #0f2d44;
  --deep-blue: #0394ca;
  --sky: #77d1ea;
  --mint: #a8eff2;
  --cream: #fff7d7;
  --card: rgba(255, 255, 255, 0.86);
  --card-strong: rgba(255, 255, 255, 0.94);
  --shadow: 0 24px 70px rgba(0, 82, 132, 0.22);
  --text-on-card: #153a52;
  --text-on-card-muted: #2d5a75;
  --text-on-sky: #ffffff;
  --ease-morph: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.22s;
  --t-med: 0.45s;
  --t-slow: 0.7s;
  --scroll-track: rgba(255, 255, 255, 0.38);
  --scroll-thumb: rgba(6, 96, 138, 0.72);
  --scroll-thumb-hover: rgba(6, 96, 138, 0.9);
  --scroll-thumb-active: rgba(4, 62, 98, 0.95);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* Custom scrollbars (WebKit / Blink / older Edge) */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  margin: 6px 0;
  border-radius: 999px;
  background: var(--scroll-track);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
  background-color: var(--scroll-thumb);
  box-shadow: 0 2px 8px rgba(0, 55, 95, 0.2);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
  background-color: var(--scroll-thumb-active);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Fredoka", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(65rem 46rem at 25% 12%, rgba(174, 239, 247, 0.8) 0%, rgba(120, 210, 234, 0.52) 38%, rgba(6, 156, 207, 0) 68%),
    radial-gradient(38rem 30rem at 78% 42%, rgba(105, 196, 225, 0.62) 0%, rgba(16, 159, 211, 0.42) 44%, rgba(2, 143, 202, 0) 75%),
    radial-gradient(36rem 31rem at 44% 72%, rgba(129, 220, 237, 0.5) 0%, rgba(31, 171, 215, 0.25) 52%, rgba(3, 148, 202, 0) 76%),
    linear-gradient(135deg, #0aa6d4 0%, #0ca1d2 42%, #008bc5 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}

body::before {
  width: 42rem;
  height: 42rem;
  top: -17rem;
  left: -11rem;
  background: rgba(188, 241, 247, 0.45);
  border-radius: 58% 42% 62% 38% / 48% 55% 45% 52%;
  animation: bg-blob-a 22s ease-in-out infinite;
}

body::after {
  width: 33rem;
  height: 25rem;
  right: 6vw;
  bottom: -9rem;
  background: rgba(137, 221, 236, 0.5);
  border-radius: 42% 58% 48% 52% / 55% 45% 52% 48%;
  animation: bg-blob-b 26s ease-in-out infinite;
}

a {
  color: inherit;
}

.site-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 44px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(28px, env(safe-area-inset-top, 0px));
  padding-bottom: max(44px, env(safe-area-inset-bottom, 0px));
}

/* Cross-document page transitions: both pages must opt in (Chrome 126+). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root) {
    animation: page-tx-out 0.38s var(--ease-out-soft) both;
  }

  ::view-transition-new(root) {
    animation: page-tx-in 0.42s var(--ease-out-soft) both;
  }
}

@keyframes page-tx-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.992);
  }
}

@keyframes page-tx-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 32px;
  align-items: center;
  min-height: 590px;
}

.hero-card,
.feature-card,
.character-card,
.cta-card,
.game-frame-card {
  border: 2px solid rgba(255, 255, 255, 0.52);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition:
    transform var(--t-med) var(--ease-morph),
    box-shadow var(--t-med) var(--ease-out-soft),
    border-color var(--t-fast) ease,
    border-radius var(--t-slow) var(--ease-out-soft),
    filter var(--t-med) ease;
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card:hover,
  .character-card:hover,
  .cta-card:hover,
  .game-frame-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 32px 80px rgba(0, 82, 132, 0.28);
    border-color: rgba(255, 255, 255, 0.72);
  }

  .character-card:hover {
    border-radius: 36px 28px 38px 30px / 32px 34px 30px 36px;
  }

  .feature-card:hover {
    border-radius: 34px 26px 32px 28px / 28px 32px 30px 34px;
  }
}

.hero-card {
  position: relative;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 42px;
  overflow: hidden;
}

.hero-card::before {
  position: absolute;
  width: 12rem;
  height: 12rem;
  top: -4rem;
  right: -2rem;
  border-radius: 62% 38% 55% 45% / 48% 52% 48% 52%;
  background: rgba(255, 247, 215, 0.68);
  content: "";
  animation: hero-blob-morph 14s ease-in-out infinite;
  transition: border-radius 0.8s var(--ease-out-soft);
}

.hero-card:hover::before {
  border-radius: 45% 55% 48% 52% / 55% 45% 52% 48%;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(8, 127, 179, 0.2);
  color: #065a82;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

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

h1 {
  position: relative;
  max-width: 740px;
  margin-bottom: 18px;
  color: var(--text-on-sky);
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 0 rgba(0, 70, 110, 0.35),
    0 8px 28px rgba(0, 50, 90, 0.45);
}

.hero-copy {
  position: relative;
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--text-on-card);
  font-size: clamp(1.14rem, 2.4vw, 1.38rem);
  font-weight: 600;
  line-height: 1.62;
}

.button-row {
  position: relative;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.social-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform var(--t-fast) var(--ease-morph),
    box-shadow var(--t-fast) var(--ease-out-soft),
    filter var(--t-fast) ease,
    border-radius var(--t-med) var(--ease-out-soft),
    background-color var(--t-fast) ease,
    color var(--t-fast) ease;
}

.button:hover {
  transform: translateY(-3px) scale(1.02);
}

.button:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}

.button.primary {
  background: #ffffff;
  color: #056f9e;
  box-shadow: 0 14px 26px rgba(2, 109, 169, 0.25);
}

.button.secondary {
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 40, 70, 0.55), 0 2px 12px rgba(0, 50, 90, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.button.secondary.dark {
  border-color: rgba(8, 143, 199, 0.28);
  color: #087fb3;
  text-shadow: none;
}

.button.icon {
  width: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
}

.button.icon svg {
  display: block;
  width: 30px;
  height: 30px;
}

.hero-card .button.icon.secondary {
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.98);
  color: #0d4a6a;
  text-shadow: none;
  box-shadow: 0 6px 20px rgba(0, 70, 110, 0.2);
}

.hero-card .button.icon.secondary:hover {
  background: #ffffff;
  color: #083352;
  transform: translateY(-3px) scale(1.08) rotate(-4deg);
}

.hero-card .button.icon.secondary:active {
  transform: scale(0.95) rotate(0deg);
}

.logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
}

.logo-stage::before {
  position: absolute;
  width: min(88%, 430px);
  aspect-ratio: 1;
  border-radius: 52% 48% 58% 42% / 46% 54% 44% 56%;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.35), var(--shadow);
  content: "";
  animation:
    floaty 7s ease-in-out infinite,
    logo-blob-morph 16s ease-in-out infinite;
  transition: border-radius 1s var(--ease-out-soft);
}

.main-logo {
  position: relative;
  width: min(82%, 360px);
  height: auto;
  filter: drop-shadow(0 26px 24px rgba(0, 76, 128, 0.28));
  transition:
    transform var(--t-med) var(--ease-morph),
    filter var(--t-med) ease;
}

@media (prefers-reduced-motion: no-preference) {
  .logo-stage:hover .main-logo {
    transform: scale(1.04) rotate(-1.5deg);
    filter: drop-shadow(0 32px 36px rgba(0, 76, 128, 0.35));
  }
}

.floating-cat {
  position: absolute;
  width: clamp(82px, 13vw, 138px);
  padding: 8px;
  border-radius: 28px 24px 30px 26px / 26px 30px 24px 28px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 14px 28px rgba(0, 80, 130, 0.18);
  animation:
    bob 4.8s ease-in-out infinite,
    floaty-blob-morph 12s ease-in-out infinite;
  transition:
    transform var(--t-med) var(--ease-morph),
    border-radius var(--t-slow) var(--ease-out-soft),
    box-shadow var(--t-med) ease;
}

@media (prefers-reduced-motion: no-preference) {
  .floating-cat:hover {
    border-radius: 24px 32px 26px 30px / 30px 26px 32px 24px;
    box-shadow: 0 20px 36px rgba(0, 80, 130, 0.24);
  }
}

.floating-cat.one {
  top: 0;
  right: 4%;
}

.floating-cat.two {
  bottom: 6%;
  left: 1%;
  animation-delay: -1.5s;
}

.site-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.site-nav a {
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 40, 70, 0.45);
  transition:
    transform var(--t-fast) var(--ease-morph),
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    box-shadow var(--t-fast) ease;
}

.site-nav a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 70, 110, 0.2);
}

.site-nav a:active {
  transform: translateY(0);
}

.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.78);
  color: #087fb3;
  text-shadow: none;
}

.site-nav--tabs {
  gap: 6px;
  padding: 8px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 32px rgba(0, 70, 110, 0.12);
}

.site-nav--tabs a {
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.site-nav--tabs a:hover {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

.site-nav--tabs a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px rgba(0, 70, 110, 0.15);
}

.contact-page {
  margin-top: 20px;
}

.generator-page {
  margin-top: 20px;
}

.generator-card {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: clamp(20px, 4vw, 30px);
  border-radius: 30px;
}

.generator-card h2 {
  margin: 0;
  color: #06608a;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
}

.generator-preview {
  min-height: 74px;
  padding: 14px;
  border: 2px solid rgba(8, 143, 199, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: #0d4a6a;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

.generator-copy.button.primary {
  width: fit-content;
  justify-self: center;
}

.generator-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.generator-pane {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 24px);
  border-radius: 28px;
}

.generator-pane h3 {
  margin: 0 0 4px;
  color: #06608a;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 800;
}

.generator-pane label {
  color: var(--text-on-card);
  font-size: 0.95rem;
  font-weight: 700;
}

.generator-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(8, 143, 199, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #0d4a6a;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.generator-emoji-input {
  font-size: 1.35rem;
}

.generator-input:focus-visible {
  outline: 3px solid rgba(7, 141, 198, 0.35);
  outline-offset: 2px;
}

.generator-text-preview {
  min-height: 58px;
  padding: 12px;
  border-radius: 14px;
  border: 2px solid rgba(8, 143, 199, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: #0d4a6a;
  font-size: 1.2rem;
  font-weight: 700;
  word-break: break-word;
}

.contact-links {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.contact-card {
  display: flex;
  padding: 22px 24px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  transition:
    transform var(--t-fast) var(--ease-morph),
    box-shadow var(--t-med) var(--ease-out-soft),
    border-color var(--t-fast) ease;
}

.contact-card-icon {
  display: flex;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  color: #0d4a6a;
  box-shadow: 0 6px 16px rgba(0, 70, 110, 0.12);
}

.contact-card-icon svg {
  display: block;
  width: 30px;
  height: 30px;
}

.contact-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 64px rgba(0, 82, 132, 0.22);
}

.contact-card-label {
  color: #06608a;
  font-size: 1.35rem;
  font-weight: 800;
}

.contact-card-hint {
  color: var(--text-on-card-muted);
  font-size: 1.02rem;
  font-weight: 600;
}

.section {
  margin-top: 48px;
}

.play-hero {
  margin-top: 28px;
}

.not-found-hero {
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.not-found-card {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(30px, 6vw, 62px);
  border-radius: 42px;
  overflow: hidden;
  text-align: center;
}

.not-found-card::before,
.not-found-card::after {
  position: absolute;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.not-found-card::before {
  width: 190px;
  height: 190px;
  top: -72px;
  right: -52px;
  background: rgba(255, 247, 215, 0.68);
}

.not-found-card::after {
  width: 150px;
  height: 150px;
  bottom: -66px;
  left: -42px;
  background: rgba(168, 239, 242, 0.56);
}

.not-found-code {
  position: relative;
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(4.8rem, 18vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  text-shadow:
    0 7px 0 rgba(0, 116, 176, 0.28),
    0 22px 38px rgba(0, 75, 130, 0.28);
}

.not-found-card h1,
.not-found-card p,
.not-found-cat,
.not-found-card .button-row {
  position: relative;
}

.not-found-cat {
  width: clamp(92px, 18vw, 150px);
  margin-bottom: 12px;
  filter: drop-shadow(0 14px 18px rgba(0, 92, 146, 0.18));
}

.not-found-card h1 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.not-found-card p {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--text-on-card-muted);
  font-size: clamp(1.08rem, 3.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.65;
}

.not-found-card .button-row {
  justify-content: center;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 8px;
  color: var(--text-on-sky);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  text-shadow:
    0 2px 0 rgba(0, 70, 110, 0.3),
    0 10px 28px rgba(0, 50, 90, 0.4);
}

.section-heading p {
  color: rgba(255, 255, 255, 0.98);
  font-size: clamp(1.08rem, 2.5vw, 1.22rem);
  font-weight: 600;
  line-height: 1.65;
  text-shadow: 0 1px 3px rgba(0, 35, 65, 0.55), 0 2px 16px rgba(0, 50, 90, 0.25);
}

.section-heading a.inline-sky-link,
.contact-page .section-heading a {
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-shadow: 0 1px 3px rgba(0, 35, 65, 0.55);
}

.section-heading a.inline-sky-link:hover,
.contact-page .section-heading a:hover {
  color: #e8f8ff;
}

.cta-card a.inline-sky-link {
  color: #06608a;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.cta-card a.inline-sky-link:hover {
  color: #044a6a;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.feature-card {
  padding: 24px;
  border-radius: 30px;
}

.feature-card h3,
.character-card h3 {
  margin-bottom: 10px;
  color: #06608a;
  font-size: clamp(1.35rem, 3.5vw, 1.5rem);
  font-weight: 800;
}

.feature-card p,
.character-card p,
.cta-card p {
  margin-bottom: 0;
  color: var(--text-on-card-muted);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.62;
}

.game-frame-card {
  padding: clamp(16px, 3vw, 28px);
  border-radius: 36px;
}

.game-frame-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.game-frame-header h2 {
  margin-bottom: 0;
  color: #06608a;
  font-size: clamp(1.65rem, 4.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
}

.game-frame-shell {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 2px rgba(8, 143, 199, 0.12);
}

/*
 * iPhone Safari does not support the Fullscreen API on iframe/wrapper elements.
 * This class mimics fullscreen: hide site chrome and fill the visual viewport.
 */
body.game-immersive {
  overflow: hidden;
  overscroll-behavior: none;
}

body.game-immersive .site-shell > *:not(.game-frame-card) {
  display: none;
}

body.game-immersive .site-shell {
  padding: 0;
  margin: 0;
  min-height: 100dvh;
}

body.game-immersive .game-frame-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border-radius: 0;
  min-height: 100dvh;
  height: 100dvh;
  max-width: none;
}

body.game-immersive .game-frame-header {
  display: none;
}

body.game-immersive .game-frame-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  border-radius: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.game-immersive .game-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
}

body.game-immersive .game-fullscreen-btn {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
}

/* Fallback: whole embed shell fullscreen if iframe API fails */
.game-frame-shell:fullscreen {
  display: flex;
  min-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  background: #0a1620;
}

.game-frame-shell:fullscreen .game-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 0;
}

.game-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  background: #000;
}

.game-frame {
  display: block;
  width: 100%;
  min-height: min(72vw, 720px);
  border: 0;
  border-radius: 0;
  background: transparent;
  transition:
    border-radius var(--t-slow) var(--ease-out-soft),
    box-shadow var(--t-med) ease;
}

.game-frame:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
}

.game-fullscreen-btn {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(6, 96, 138, 0.92);
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 40, 70, 0.35);
  transition:
    transform var(--t-fast) var(--ease-morph),
    background-color var(--t-fast) ease,
    box-shadow var(--t-fast) ease;
}

.game-fullscreen-btn .fs-icon {
  display: block;
  flex-shrink: 0;
}

.game-fullscreen-btn:hover {
  transform: translateY(-2px);
  background: rgba(8, 120, 170, 0.95);
  box-shadow: 0 12px 28px rgba(0, 40, 70, 0.4);
}

.game-fullscreen-btn:active {
  transform: translateY(0);
}

.game-fullscreen-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.character-card {
  display: flex;
  min-height: 250px;
  padding: 20px;
  border-radius: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.character-card img {
  max-width: 100%;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 12px 12px rgba(0, 92, 146, 0.16));
  transition:
    transform var(--t-med) var(--ease-morph),
    filter var(--t-med) ease;
}

@media (prefers-reduced-motion: no-preference) {
  .character-card:hover img {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 18px 20px rgba(0, 92, 146, 0.22));
  }
}

.cta-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 36px;
  background: var(--card-strong);
}

.cta-card h2 {
  margin-bottom: 8px;
  color: #06608a;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
}

.site-footer {
  margin-top: 42px;
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 35, 65, 0.5);
}

.site-footer p {
  overflow-wrap: anywhere;
}

.site-footer .footer-email {
  display: inline-block;
  margin-top: 10px;
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-shadow: 0 1px 3px rgba(0, 35, 65, 0.45);
}

.site-footer .footer-email:hover {
  color: #e8f8ff;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-16px) rotate(3deg);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-12px) rotate(4deg);
  }
}

@keyframes bg-blob-a {
  0%,
  100% {
    border-radius: 58% 42% 62% 38% / 48% 55% 45% 52%;
    transform: translate(0, 0) scale(1);
  }

  33% {
    border-radius: 48% 52% 44% 56% / 58% 42% 52% 48%;
    transform: translate(2%, 1%) scale(1.03);
  }

  66% {
    border-radius: 55% 45% 52% 48% / 42% 58% 48% 52%;
    transform: translate(-1%, 2%) scale(0.98);
  }
}

@keyframes bg-blob-b {
  0%,
  100% {
    border-radius: 42% 58% 48% 52% / 55% 45% 52% 48%;
    transform: translate(0, 0) scale(1);
  }

  50% {
    border-radius: 52% 48% 55% 45% / 45% 55% 48% 52%;
    transform: translate(-2%, -1%) scale(1.04);
  }
}

@keyframes hero-blob-morph {
  0%,
  100% {
    border-radius: 62% 38% 55% 45% / 48% 52% 48% 52%;
  }

  50% {
    border-radius: 44% 56% 50% 50% / 54% 46% 52% 48%;
  }
}

@keyframes logo-blob-morph {
  0%,
  100% {
    border-radius: 52% 48% 58% 42% / 46% 54% 44% 56%;
  }

  50% {
    border-radius: 46% 54% 48% 52% / 52% 48% 56% 44%;
  }
}

@keyframes floaty-blob-morph {
  0%,
  100% {
    border-radius: 28px 24px 30px 26px / 26px 30px 24px 28px;
  }

  50% {
    border-radius: 24px 30px 26px 28px / 28px 26px 30px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .hero-card::before,
  .logo-stage::before,
  .floating-cat {
    animation: none !important;
    transition: none !important;
  }

  body::before,
  body::after {
    border-radius: 999px;
  }

  .hero-card::before {
    border-radius: 999px;
  }

  .logo-stage::before {
    border-radius: 52% 48% 58% 42%;
  }

  .floating-cat {
    border-radius: 28px;
  }

  @view-transition {
    navigation: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .hero,
  .cta-card {
    grid-template-columns: 1fr;
  }

  .generator-inputs {
    grid-template-columns: 1fr;
  }

  .game-frame-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    gap: 24px;
  }

  .logo-stage {
    min-height: min(320px, 52vw);
    order: -1;
  }

  .main-logo {
    width: min(78%, 300px);
  }

  .floating-cat {
    width: clamp(72px, 16vw, 120px);
  }

  .feature-grid,
  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    margin-top: 36px;
  }

  .cta-actions {
    justify-content: stretch;
  }

  .cta-actions .button,
  .cta-card > .button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero-card .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card .button:not(.icon) {
    width: 100%;
    justify-content: center;
  }

  .hero-card .social-icons {
    justify-content: center;
    width: 100%;
    padding-top: 4px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1.05rem;
  }

  .site-shell {
    padding: 18px 12px 36px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .hero-card {
    border-radius: 28px;
    padding: clamp(22px, 5vw, 40px);
  }

  h1 {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
    line-height: 1.08;
  }

  .feature-grid,
  .character-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .character-card {
    min-height: auto;
    padding: 18px 16px;
  }

  .character-card img {
    height: 112px;
  }

  .game-frame {
    min-height: min(58vh, 480px);
  }

  .cta-card {
    padding: 20px 18px;
    gap: 16px;
  }

  .game-frame-card {
    padding: 14px;
  }

  .site-nav {
    gap: 8px;
  }

  .site-nav a {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    text-align: center;
    font-size: 0.98rem;
    padding: 12px 12px;
  }
}

@media (max-width: 380px) {
  .button {
    font-size: 0.98rem;
    padding: 13px 16px;
  }

  .eyebrow {
    font-size: 0.88rem;
    padding: 8px 12px;
  }
}
