@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap");

:root {
  font-family: "Nunito", "Trebuchet MS", Verdana, sans-serif;
  color: #173b76;
  background: #eefbff;
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { max-width: 100%; }
::selection { background: #ffe382; color: #173b76; }

.skip-link {
  position: fixed; z-index: 100; left: 1rem; top: -5rem;
  padding: .85rem 1rem; border-radius: .8rem; background: #fff; color: #173b76;
  font-weight: 900; box-shadow: 0 8px 24px #11295544;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 4px solid #ffbf49; outline-offset: 5px; }

.site-shell {
  overflow: clip;
  min-height: 100vh;
  background:
    radial-gradient(circle at 87% 9%, #fff3b5 0, transparent 22rem),
    radial-gradient(circle at 8% 53%, #ddf8fa 0, transparent 28rem),
    linear-gradient(180deg, #eefbff 0%, #f8fdff 58%, #eaf7ff 100%);
}

.topbar {
  max-width: 1440px; margin: auto; min-height: 102px;
  padding: 22px clamp(22px, 5vw, 76px);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 900; letter-spacing: -.065em; white-space: nowrap;
}
.brand-mark {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 14px; background: #ffbd63; color: #17427b; font-size: 1.7rem;
  transform: rotate(-11deg); box-shadow: 0 5px 0 #e49358;
}
.brand-accent { color: #f6796d; }
.top-nav { display: flex; align-items: center; gap: .7rem; }
.top-link {
  padding: .7rem 1.15rem; text-decoration: none; font-weight: 900; font-size: .95rem;
  border: 2px solid #bad8ea; border-radius: 100px; background: #fff9;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.top-link span { padding-left: .4rem; font-size: 1.1rem; }
.top-link:hover { transform: translateY(-3px); background: #fff; border-color: #70cae5; }
.account-link {
  padding: .7rem 1.15rem; text-decoration: none; font-weight: 900; font-size: .95rem;
  border: 2px solid #f4b857; border-radius: 100px; background: #ffdc87;
  box-shadow: 0 4px 0 #dfaa54; white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}
.account-link:hover { transform: translateY(-3px); background: #ffe8ac; }

.hero {
  position: relative; display: grid; grid-template-columns: .92fr 1.08fr;
  max-width: 1440px; min-height: 640px; margin: auto;
  padding: 26px clamp(22px, 5vw, 76px) 85px; align-items: center; gap: 1rem;
}
.hero::after {
  content: ""; position: absolute; z-index: 0; left: -20vw; right: -20vw; bottom: -1px;
  height: 72px; background: #fff;
  clip-path: polygon(0 60%, 8% 65%, 16% 49%, 24% 57%, 35% 42%, 47% 53%, 57% 34%, 66% 53%, 78% 41%, 88% 54%, 100% 35%, 100% 100%, 0 100%);
}
.hero-copy { position: relative; z-index: 2; padding: 15px 0 50px; }
.eyebrow, .section-kicker {
  color: #177eb0; font-size: .85rem; font-weight: 900; letter-spacing: .16em;
}
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem; }
.eyebrow-spark { color: #f7a34f; font-size: 1.2rem; line-height: 1; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 680px; margin-bottom: 1.4rem; color: #163e7e;
  font-size: clamp(3.5rem, 6.25vw, 6.75rem);
  font-weight: 900; line-height: .98; letter-spacing: -.075em;
}
h1 em {
  position: relative; display: inline-block; color: #f07866;
  font-style: normal; transform: rotate(-2deg); white-space: nowrap;
}
h1 em::after {
  content: ""; position: absolute; left: 1%; right: 0; bottom: -.17em; height: .13em;
  border-radius: 100%; background: #ffcb69; transform: rotate(-2deg);
}
.hero-lead {
  max-width: 530px; color: #526f93; font-size: clamp(1.07rem, 1.6vw, 1.28rem);
  line-height: 1.65; font-weight: 700; margin: 2.3rem 0 2rem;
}
.hero-lead strong { color: #173b76; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: .7rem;
  min-height: 60px; text-decoration: none; font-weight: 900; font-size: 1.05rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button-primary {
  padding: .9rem 1.55rem; border-radius: 18px; color: #173b76;
  background: #ffcc61; box-shadow: 0 8px 0 #e9a444, 0 16px 28px #1d558024;
}
.button-primary:hover { transform: translateY(-4px); box-shadow: 0 12px 0 #e9a444, 0 21px 30px #1d558030; background: #ffdc82; }
.button-primary:active { transform: translateY(4px); box-shadow: 0 4px 0 #e9a444; }
.button-account {
  padding: .8rem 1.2rem; border: 2px solid #8bbfe0; border-radius: 18px;
  background: #fff; color: #185184; box-shadow: 0 6px 0 #bad8eb;
}
.button-account:hover { transform: translateY(-3px); background: #effaff; }
.button-icon {
  display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; font-size: .7rem; padding-left: 2px;
}
.button-text { padding: .8rem .4rem; color: #1b578c; }
.button-text:hover { transform: translateX(4px); }
.hero-note {
  display: inline-flex; align-items: center; gap: .5rem; color: #6c8dac;
  font-size: .88rem; font-weight: 900; margin-top: 1.65rem;
}
.note-icon { color: #f5ab5d; font-size: 1.15rem; }
.home-account-name {
  width: fit-content; margin: 1.1rem 0 0; padding: .55rem .85rem;
  border-radius: 12px; background: #e0f7ef; color: #17634f; font-weight: 900;
}
.home-account-status { margin: 1rem 0 0; color: #687f9c; font-size: .9rem; font-weight: 800; }

.invitation-panel {
  max-width: 1280px; margin: 0 auto 3rem; padding: 1.5rem clamp(18px, 3vw, 32px);
  border: 2px solid #b9dced; border-radius: 24px; background: #fff;
  box-shadow: 0 12px 34px #204d7620;
}
.invitation-panel[hidden] { display: none; }
.account-site .invitation-panel { margin: 1.6rem 0; padding: 1.25rem; box-shadow: none; }
.invitation-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.invitation-heading h2, .invitation-heading h3 { margin: .2rem 0; font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
.invitation-heading .button { min-height: 42px; padding: .5rem 1rem; font-size: .9rem; }
.invitation-status { margin: .7rem 0; color: #526f93; font-weight: 800; }
.invitation-status[data-error="true"] { color: #a13d33; }
.invitation-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .75rem; }
.invitation-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; border-radius: 16px; background: #edf8ff;
}
.invitation-list li > div:first-child { display: grid; gap: .2rem; }
.invitation-list small { color: #526f93; }
.invitation-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.invitation-actions button {
  min-height: 42px; padding: .45rem .85rem; border: 2px solid #70bfe0;
  border-radius: 12px; background: #fff; color: #173b76; font: inherit; font-weight: 900; cursor: pointer;
}
.invitation-actions button:first-child { background: #ffdc87; border-color: #e9ad4d; }
.invitation-actions button:disabled { opacity: .55; cursor: not-allowed; }

.world {
  position: relative; min-width: 0; width: min(100%, 760px); aspect-ratio: 1.16;
  display: grid; place-items: center; isolation: isolate;
  transform: translateX(2.5%);
}
.world-glow {
  position: absolute; inset: 5% 1% 3%; z-index: -2; border-radius: 49%;
  background: radial-gradient(circle at 47% 38%, #fff7d3 0 10%, #c5eef9 45%, #a4dff4 76%, transparent 77%);
  box-shadow: inset 0 0 0 4px #ffffff80;
}
.world::before {
  content: ""; position: absolute; z-index: -1; width: 87%; height: 78%;
  border: 4px dashed #ffffffb8; border-radius: 48%; transform: rotate(17deg);
}
.orbit { position: absolute; z-index: 0; border-radius: 50%; border: 2px solid #fff9; }
.orbit-one { width: 97%; height: 88%; transform: rotate(-10deg); }
.orbit-two { width: 79%; height: 105%; transform: rotate(28deg); }
.world-star { position: absolute; z-index: 2; color: #ffb650; filter: drop-shadow(0 4px 0 #fff); animation: twinkle 3s ease-in-out infinite; }
.star-one { left: 5%; top: 18%; font-size: 3rem; }
.star-two { right: 9%; top: 24%; font-size: 2.2rem; animation-delay: .75s; }
.star-three { right: 16%; bottom: 13%; font-size: 1.6rem; animation-delay: 1.6s; }
.island-art { width: 108%; max-width: none; transform: translateY(2%); overflow: visible; }
.art-cloud { animation: drift 7s ease-in-out infinite alternate; }
.cloud-right { animation-delay: -4s; }
.art-sun { transform-origin: 396px 109px; animation: breathe 5s ease-in-out infinite; }
.island-group { animation: island-float 5s ease-in-out infinite; }
.boat { animation: boat-rock 3.5s ease-in-out infinite; transform-origin: 155px 450px; }
.whale { animation: whale-bob 4.2s ease-in-out infinite; transform-origin: 610px 480px; }
.light-beam { transform-origin: 460px 198px; animation: beam 5s ease-in-out infinite alternate; }
.scene-label {
  position: absolute; right: 1%; bottom: 10%; display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1rem; transform: rotate(5deg); border-radius: 14px;
  background: #fff; box-shadow: 0 7px 0 #bedcea, 0 15px 23px #1c4f8526;
  font-size: .76rem; font-weight: 900; letter-spacing: .08em;
}
.scene-label span { color: #f5aa57; font-size: 1.5rem; line-height: .7; }

.games { position: relative; background: #fff; padding: 80px clamp(22px, 5vw, 76px) 100px; }
.section-heading {
  max-width: 1288px; margin: 0 auto 2rem; display: flex; align-items: end;
  justify-content: space-between; gap: 2rem;
}
.section-heading h2 {
  margin: .35rem 0 0; color: #173b76; font-size: clamp(2.25rem, 4.2vw, 4.4rem);
  line-height: 1.1; letter-spacing: -.065em; font-weight: 900;
}
.section-heading h2 span { color: #ef7c6c; }
.section-heading p { max-width: 270px; margin: 0 0 .3rem; color: #6b83a3; line-height: 1.5; font-weight: 800; }
.game-grid {
  max-width: 1288px; margin: auto; display: grid;
  grid-template-columns: 1.35fr 1fr 1fr; gap: clamp(16px, 2vw, 28px);
}
.game-card {
  position: relative; min-width: 0; min-height: 450px; padding: 23px 25px 26px;
  display: flex; flex-direction: column; border-radius: 28px; overflow: hidden;
  box-shadow: 0 15px 34px #1e52871b; border: 2px solid transparent;
}
.featured-card {
  color: #fff; text-decoration: none;
  background: radial-gradient(circle at 78% 22%, #407ed0, transparent 32%), linear-gradient(155deg, #1b5fae, #173d87 82%);
  transition: transform .25s ease, box-shadow .25s ease;
}
.featured-card:hover { transform: translateY(-8px) rotate(-.5deg); box-shadow: 0 25px 38px #1e528738; }
.chess-card {
  color: #173b76; text-decoration: none; border-color: #f1d7a5;
  background: linear-gradient(160deg, #fff8eb 0%, #ffe9b6 100%);
  transition: transform .25s ease, box-shadow .25s ease;
}
.chess-card:hover { transform: translateY(-8px) rotate(.5deg); box-shadow: 0 25px 38px #a67a372e; }
.math-card {
  color: #144a68; text-decoration: none; border-color: #bce9cb;
  background: linear-gradient(155deg, #edffdb 0%, #9de8d2 58%, #74c9e8 100%);
  transition: transform .25s ease, box-shadow .25s ease;
}
.math-card:hover { transform: translateY(-8px) rotate(-.5deg); box-shadow: 0 25px 38px #308a7733; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; position: relative; z-index: 2; }
.live-pill, .soon-pill {
  display: inline-flex; align-items: center; gap: .48rem; padding: .52rem .78rem;
  border-radius: 100px; font-size: .7rem; font-weight: 900; letter-spacing: .1em;
}
.live-pill { background: #ffffff25; color: #fff; border: 1px solid #ffffff55; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #8af9b9; box-shadow: 0 0 0 4px #8af9b92a; }
.card-arrow {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: #ffffff27; font-size: 1.35rem; transition: transform .2s ease;
}
.featured-card:hover .card-arrow, .chess-card:hover .card-arrow, .math-card:hover .card-arrow { transform: translate(3px, -3px); }
.chess-card .card-arrow { background: #e9b9655c; }
.math-card .card-arrow { background: #ffffff99; }
.card-illustration { position: relative; display: grid; place-items: center; flex: 1; min-height: 210px; }
.ship-illustration svg { position: relative; z-index: 2; width: min(95%, 330px); transform: rotate(-6deg); filter: drop-shadow(0 14px 8px #06245a55); transition: transform .35s ease; }
.featured-card:hover .ship-illustration svg { transform: rotate(-2deg) translateY(-6px); }
.card-wave { position: absolute; z-index: 1; width: 75%; height: 85px; border: 3px solid #8bd8ef55; border-radius: 50%; transform: rotate(-8deg); }
.wave-a { width: 94%; transform: rotate(12deg); }
.wave-b { width: 58%; }
.card-content { position: relative; z-index: 2; }
.card-number { font-size: .75rem; letter-spacing: .13em; font-weight: 900; opacity: .73; }
.card-content h3 { margin: .4rem 0 .5rem; font-size: clamp(1.8rem, 2.2vw, 2.45rem); line-height: 1.05; letter-spacing: -.05em; font-weight: 900; }
.card-content p { max-width: 340px; margin: 0; font-weight: 700; line-height: 1.5; font-size: .98rem; }
.featured-card .card-content p { color: #dceeff; }
.card-cta {
  display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.15rem;
  color: #ffe083; font-size: 1rem; font-weight: 900;
}
.card-cta span { font-size: 1.5rem; line-height: .5; }
.chess-card .card-cta { color: #aa642d; }
.chess-live-pill {
  display: inline-flex; align-items: center; gap: .48rem; padding: .52rem .78rem;
  border-radius: 100px; font-size: .7rem; font-weight: 900; letter-spacing: .1em;
  color: #85582f; background: #fff9; border: 1px solid #e9c792;
}
.chess-live-pill .live-dot { background: #58b88c; box-shadow: 0 0 0 4px #58b88c2a; }
.chess-card .card-content p { color: #6f7890; }
.chess-card .card-number { color: #a59175; }
.math-live-pill {
  display: inline-flex; align-items: center; gap: .48rem; padding: .52rem .78rem;
  border-radius: 100px; font-size: .7rem; font-weight: 900; letter-spacing: .1em;
  color: #155b53; background: #ffffffc9; border: 1px solid #90cbb9;
}
.math-card .card-cta { color: #0c6c6a; }
.math-card .card-content p { color: #2e6572; }
.math-art { position: relative; flex: 1; min-height: 210px; isolation: isolate; }
.math-art::before {
  content: ""; position: absolute; inset: 18% 5% 5%; z-index: -2;
  border-radius: 50%; background: #36a9d8; box-shadow: inset 0 -18px 0 #218ec5;
}
.math-island {
  position: absolute; top: 35%; display: grid; place-items: center;
  width: 68px; height: 68px; border: 6px solid #fff4b6; border-radius: 50%;
  background: #64bf7f; color: #144a68; box-shadow: 0 9px 0 #288a7c, 0 17px 0 #0874a57a;
  font-size: 2rem; font-weight: 900;
}
.math-island-left { left: 9%; transform: rotate(-11deg); }
.math-island-right { right: 9%; transform: rotate(9deg); }
.math-boat { position: absolute; left: 50%; top: 26%; font-size: 5.6rem; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 9px 4px #12699083); }
.math-sun { position: absolute; top: 4%; right: 19%; color: #ffcd5a; font-size: 2.7rem; }
.math-wave { position: absolute; bottom: 9%; left: 16%; width: 27%; border-top: 4px solid #ccf5f7; border-radius: 50%; }
.math-wave-two { left: auto; right: 13%; bottom: 15%; width: 20%; }
.future-card { color: #173b76; border-color: #e7edf5; }
.future-orange { background: linear-gradient(160deg, #fff8eb 0%, #fff1d6 100%); }
.future-purple { background: linear-gradient(160deg, #f5f0ff 0%, #e8e7ff 100%); grid-column: 1 / -1; min-height: 260px; display: grid; grid-template-columns: 1fr 1fr; }
.future-purple .card-top { grid-column: 1 / -1; }
.future-purple .future-art { grid-column: 2; grid-row: 2; min-height: 140px; }
.future-purple .card-content { grid-column: 1; grid-row: 2; align-self: end; }
.soon-pill { color: #9b6d47; background: #fff9; border: 1px solid #eddfc7; }
.future-purple .soon-pill { color: #7866aa; border-color: #d9d2f4; }
.future-star { color: #eead5a; font-size: 1.65rem; }
.future-purple .future-star { color: #9b91e0; }
.future-art { position: relative; flex: 1; min-height: 210px; display: grid; place-items: center; }
.future-center {
  display: grid; place-items: center; width: 118px; height: 118px;
  border-radius: 30px; background: #ffdc95; color: #dd985d;
  font-size: 4.6rem; font-weight: 900; box-shadow: 0 12px 0 #f2c57f;
  transform: rotate(-12deg);
}
.future-art-purple .future-center { background: #c9bcf6; color: #9586d8; box-shadow: 0 12px 0 #b1a5e5; }
.future-orbit { position: absolute; width: 180px; height: 155px; border-radius: 50%; border: 2px dashed #e8b771; transform: rotate(24deg); }
.orbit-b { width: 220px; height: 105px; transform: rotate(-25deg); opacity: .6; }
.future-art-purple .future-orbit { border-color: #b5a7e3; }
.future-card .card-content p { color: #7d8ba4; }
.future-card .card-number { color: #a59175; }
.future-purple .card-number { color: #8e82ad; }

.footer {
  min-height: 100px; padding: 25px clamp(22px, 5vw, 76px); display: flex;
  align-items: center; gap: .7rem; max-width: 1440px; margin: auto;
  color: #6d87a7; font-size: .92rem; font-weight: 900;
}
.footer-mark { color: #f6ab58; font-size: 1.35rem; }
.footer a { margin-left: 1rem; text-decoration: none; color: #19639b; }
.footer a:first-of-type { margin-left: auto; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.account-site { min-height: 100vh; }
.account-layout {
  max-width: 1288px; min-height: 68vh; margin: auto;
  padding: 50px clamp(22px, 5vw, 76px) 100px;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(25px, 5vw, 80px); align-items: start;
}
.account-intro { padding-top: 45px; }
.account-intro h1 { margin: 1rem 0 1.5rem; font-size: clamp(3.2rem, 5.6vw, 5.5rem); }
.account-intro .hero-lead { margin: 1.5rem 0; }
.account-box {
  min-width: 0; padding: clamp(22px, 3.5vw, 42px);
  border: 2px solid #d5e9f4; border-radius: 28px; background: #fff;
  box-shadow: 0 22px 45px #1c52831b;
}
.account-box h2 { margin: .45rem 0 1.3rem; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.account-box h3 { margin: 1.8rem 0 1rem; font-size: 1.55rem; }
.account-status, .account-error, .account-warning {
  margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 12px;
  font-weight: 800; line-height: 1.45;
}
.account-status { background: #e7f8ff; color: #175579; }
.account-error { background: #fff0ea; color: #9c2e2a; }
.account-warning { background: #fff5db; color: #785016; }
.account-warning a { text-decoration-thickness: 2px; text-underline-offset: 2px; }
.account-muted, .field-hint { color: #647d9c; font-weight: 700; line-height: 1.5; }
.field-hint { margin: .35rem 0 1rem; font-size: .85rem; }
.field-error { margin: -.45rem 0 .9rem; color: #a92f2f; font-weight: 900; line-height: 1.4; }
.account-tabs { display: flex; gap: .5rem; margin-bottom: 1.4rem; }
.account-tabs button {
  flex: 1; padding: .7rem .8rem; border: 2px solid #c7deed; border-radius: 12px;
  background: #f2faff; color: #255987; font: inherit; font-weight: 900; cursor: pointer;
}
.account-tabs button[aria-pressed="true"] { background: #ffe49d; border-color: #e8b95b; color: #234775; }
#account-form { display: grid; }
#account-form label { margin: .2rem 0 .4rem; font-weight: 900; }
#account-form input {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  border: 2px solid #bcd7e8; border-radius: 11px; background: #fbfeff;
  color: #173b76; font: inherit;
}
#account-form input:focus { border-color: #349cc1; }
#account-form input[aria-invalid="true"] { border-color: #c44848; background: #fff8f5; }
#email-field { display: grid; }
#account-submit { width: max-content; max-width: 100%; margin-top: .6rem; border: 0; cursor: pointer; font-family: inherit; }
.account-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.account-controls button { border: 0; cursor: pointer; font-family: inherit; }
.chess-level {
  margin-top: 2rem; padding: 1.2rem; border: 2px solid #e5d7f5; border-radius: 20px;
  background: linear-gradient(130deg, #f7f0ff, #fff9e9);
}
.chess-level-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.chess-level h3 { margin: .35rem 0 .75rem; }
.chess-level-star { color: #de9b39; font-size: 2.4rem; line-height: 1; }
.chess-level-number { margin: .25rem 0; color: #283e78; font-size: 1.25rem; font-weight: 900; }
.chess-level-number strong { font-size: 2.1rem; }
.chess-level .account-muted { margin: .35rem 0 .75rem; }
.chess-level .button { margin-top: .5rem; }
#chess-level-retry { border: 0; padding: 0; background: none; color: #175f91; font: inherit; font-weight: 900; text-decoration: underline; cursor: pointer; }
.history { border-top: 2px solid #e4f0f7; margin-top: 2rem; }
.history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 1.5rem; }
.history-summary div { padding: .75rem; border-radius: 13px; background: #eef9ff; text-align: center; }
.history-summary dt { color: #5d7d9e; font-size: .82rem; font-weight: 900; }
.history-summary dd { margin: .15rem 0 0; color: #163e7e; font-size: 1.65rem; font-weight: 900; }
.history-list { display: grid; gap: .7rem; padding-left: 1.4rem; }
.history-list li { padding: .6rem .7rem; line-height: 1.45; }
.history-list li span, .history-list li time { display: block; }
.history-list li time { color: #6885a2; font-size: .88rem; }
.history-win { color: #167951; }
.history-loss { color: #ab4545; }
.history-draw { color: #6253a6; }
#history-more { border: 0; cursor: pointer; font-family: inherit; }
[hidden] { display: none !important; }

@keyframes drift { from { transform: translateX(-10px); } to { transform: translateX(11px); } }
@keyframes breathe { 50% { transform: scale(1.055); } }
@keyframes island-float { 50% { transform: translateY(-6px); } }
@keyframes boat-rock { 50% { transform: rotate(4deg) translateY(-6px); } }
@keyframes whale-bob { 50% { transform: rotate(-3deg) translateY(-13px); } }
@keyframes beam { to { transform: rotate(7deg); opacity: .7; } }
@keyframes twinkle { 50% { transform: scale(.7) rotate(14deg); opacity: .6; } }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 570px; }
  h1 { font-size: clamp(3.2rem, 6vw, 5rem); }
  .world { width: 110%; }
  .game-grid { grid-template-columns: 1.2fr 1fr; }
  .future-purple { grid-column: 1 / -1; min-height: 300px; display: grid; grid-template-columns: 1fr 1fr; }
  .future-purple .card-top { grid-column: 1 / -1; }
  .future-purple .future-art { grid-column: 2; grid-row: 2; min-height: 170px; }
  .future-purple .card-content { grid-column: 1; grid-row: 2; align-self: end; }
}
@media (max-width: 760px) {
  .topbar { min-height: 78px; flex-wrap: wrap; }
  .top-link { font-size: .8rem; padding: .55rem .8rem; }
  .account-link { font-size: .8rem; padding: .55rem .8rem; }
  .hero { display: flex; flex-direction: column; align-items: stretch; padding-top: 34px; padding-bottom: 75px; gap: 0; }
  .hero-copy { padding-bottom: 0; }
  h1 { max-width: 620px; font-size: clamp(3.7rem, 13vw, 6rem); }
  .hero-lead { margin: 1.75rem 0; }
  .world { align-self: center; width: min(100%, 610px); margin: 10px 0 -10px; transform: none; }
  .scene-label { right: 3%; bottom: 9%; }
  .section-heading { align-items: start; flex-direction: column; gap: .65rem; }
  .section-heading p { max-width: 480px; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .featured-card { grid-column: 1 / -1; min-height: 420px; }
  .future-card { min-height: 360px; }
  .future-purple { grid-column: 1 / -1; display: flex; min-height: 360px; }
  .future-purple .future-art, .future-purple .card-content { grid-column: auto; grid-row: auto; }
  .account-layout { grid-template-columns: 1fr; padding-top: 20px; gap: 1.2rem; }
  .account-intro { padding-top: 0; }
  .account-intro h1 { font-size: clamp(3rem, 11vw, 5rem); }
}
@media (max-width: 520px) {
  .brand { font-size: 1.25rem; }
  .brand-mark { width: 36px; height: 36px; }
  .top-nav { margin-left: auto; }
  .top-link { display: none; }
  .account-link { font-size: .72rem; padding: .55rem .7rem; white-space: normal; text-align: center; max-width: 135px; }
  .hero { padding-top: 22px; }
  .eyebrow { font-size: .7rem; letter-spacing: .13em; }
  h1 { font-size: clamp(3.3rem, 13vw, 4.7rem); }
  .hero-lead { font-size: 1.04rem; }
  .hero-actions { align-items: stretch; }
  .button-primary { width: 100%; }
  .button-account { width: 100%; }
  .button-text { min-height: 42px; }
  .world { width: 110%; margin-left: -5%; }
  .scene-label { font-size: .62rem; padding: .55rem .7rem; }
  .games { padding-top: 62px; padding-bottom: 70px; }
  .game-grid { grid-template-columns: 1fr; }
  .featured-card { grid-column: auto; }
  .chess-card, .math-card, .future-card, .future-purple { min-height: 300px; }
  .future-art { min-height: 145px; }
  .future-center { width: 85px; height: 85px; font-size: 3.3rem; border-radius: 23px; }
  .future-orbit { width: 150px; height: 110px; }
  .orbit-b { width: 175px; height: 75px; }
  .footer { flex-wrap: wrap; }
  .footer a:first-of-type { margin-left: 0; }
  .account-box { padding: 22px; }
  .history-summary { grid-template-columns: repeat(2, 1fr); }
  #account-submit, .account-controls .button { width: 100%; }
  .invitation-panel { margin-left: 12px; margin-right: 12px; }
  .account-site .invitation-panel { margin-left: 0; margin-right: 0; }
  .invitation-heading { align-items: flex-start; }
  .invitation-heading .button { width: auto; }
  .invitation-list li { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
