:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #3e424d;
  background: #fdfdfe;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 2px solid #853238;
  outline-offset: 4px;
}

.home {
  position: relative;
  container-type: inline-size;
  min-height: 32rem;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background-color: #fdfdfe;
  background-image:
    radial-gradient(ellipse at 51% 56%, #fff4 0%, transparent 52%),
    radial-gradient(circle, #bbc2d2 0, #bbc2d298 .064cqw, transparent .109cqw);
  background-size: auto, 1.86cqw 3.22%;
  background-position: 0 0, -.80cqw 0;
}

.scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("./architecture.svg") center / 100% 100% no-repeat;
}

.ribbons {
  position: absolute;
  inset: 20.98% 0 34.91%;
  background: url("./orbit.svg") center / 100% 100% no-repeat;
}

.globe {
  position: absolute;
  left: 70.66%;
  top: 7.36%;
  width: 35.29%;
  height: 58.02%;
  overflow: visible;
}

.globe-outline { fill: url("#globe-surface"); stroke: url("#globe-lines"); }
.globe-grid, .globe-outline { stroke-width: 1.65px; }
.globe-grid { fill: none; stroke: url("#globe-lines"); }

.wordmark {
  --logo-size: 9.13cqw;
  position: absolute;
  top: 30.82%;
  left: 0;
  width: 100%;
  height: 22.98%;
  margin: 0;
  font-size: var(--logo-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.29cqw;
}

.wordmark-name, .wordmark-badge {
  position: absolute;
  top: 0;
  height: 100%;
  display: grid;
  align-items: center;
}

.wordmark-name {
  right: 37.83%;
  color: #fdfdfd;
  text-shadow: 0 .1cqw .27cqw #fdfdfd20;
}

.wordmark-badge {
  left: 62.56%;
  width: 18.53%;
  justify-content: center;
  padding-right: .24cqw;
  color: #080303;
  background: radial-gradient(ellipse at 28% 100%, #da5555, transparent 72%),
              linear-gradient(120deg, #d54c4d 1%, #d74e4e 53%, #d44949);
  border: max(1px, .108cqw) solid #fff;
  border-radius: 3.3cqw;
}

.tagline {
  position: absolute;
  top: 54.45%;
  left: 52%;
  transform: translateX(-50%);
  margin: 0;
  color: #777c8a;
  font-size: 2.055cqw;
  line-height: 1.26;
  font-style: italic;
  letter-spacing: .021cqw;
  white-space: nowrap;
}

.actions {
  position: absolute;
  inset: 68.04% 12.90% auto 16.86%;
  display: grid;
  grid-template-columns: 281fr 292fr 270fr 272fr;
  gap: 1.18cqw;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.48cqw;
  min-height: 5.12cqw;
  padding: 0 0 0 .34cqw;
  background: linear-gradient(170deg, #e8e9ed, #ededef 62%, #e7e8ec);
  border: max(1px, .109cqw) solid #fcfcfe;
  border-radius: 999px;
  box-shadow: 0 .27cqw .49cqw #555c7450, 0 .76cqw 1.3cqw #656b8527, inset 0 0 1cqw #ffffff36;
  color: inherit;
  font-size: 1.90cqw;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .19s ease, box-shadow .19s ease, background-color .19s ease;
}

.action svg { width: 2.76cqw; height: 2.76cqw; flex: none; }
.action:hover { transform: translateY(-3px); box-shadow: 0 .38cqw .65cqw #555c744b, 0 .92cqw 1.35cqw #656b8530; }
.action:active { transform: translateY(1px) scale(.98); }

.apps {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: clamp(3rem, 7vh, 6rem) clamp(1rem, 6vw, 7rem) clamp(3rem, 7vh, 6rem) clamp(3rem, 11vw, 12rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 87% 14%, #f6e3e680, transparent 40%),
    radial-gradient(ellipse at 14% 85%, #e5e9f2a0, transparent 46%),
    radial-gradient(circle, #a8b0c066 .8px, transparent 1.6px) 0 0 / clamp(19px, 1.86vw, 33px) clamp(19px, 1.86vw, 33px),
    #fdfdfe;
}

.apps::before, .apps::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.apps::before {
  inset: 14% -14% 22% -13%;
  border: 1px solid #b2bacc61;
  border-radius: 50%;
  box-shadow: 0 1.3rem 0 #d5dae748, 0 1.4rem 0 #fff9, 0 2rem 0 #e4e7ee50;
  transform: rotate(-14deg);
}

.apps::after {
  width: clamp(18rem, 44vw, 46rem);
  aspect-ratio: 1;
  top: -28%;
  right: -8%;
  border: 1px solid #b2bacc60;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 53%, transparent 0 17%, #b4bdce42 17.1% 17.4%),
    linear-gradient(142deg, #e2e6f075, #fff0 70%);
  mask-image: linear-gradient(#000, #0000);
}

.apps-inner { width: min(100%, 82rem); margin-inline: auto; }
.apps h2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .7rem;
  margin: 0 0 clamp(1rem, 3.4vh, 2.35rem);
  color: #3e424d;
  font-size: clamp(2.85rem, 5.4vw, 5.6rem);
  line-height: .97;
  letter-spacing: -.064em;
}
.apps h2::after {
  content: "";
  width: .78em;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #cd757b, #ebafb64d);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 1.5vw, 1.5rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.app-slot {
  --app-ink: #7b849b;
  --app-tint: #e1e6f1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: stretch;
  min-height: clamp(7.4rem, 16.6vh, 10.5rem);
  padding: .42rem;
  border: 1px solid #fff;
  border-radius: clamp(.95rem, 1.85vw, 1.65rem);
  background: linear-gradient(140deg, #fffffff5, #eff0f6d9);
  box-shadow: 0 5px 14px #606e8a1a, inset 0 0 0 1px #b8bfd319;
  transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
}
.app-slot:nth-child(4n + 1), .app-slot:nth-child(7) { --app-ink: #aa616a; --app-tint: #f2dbe0; }
.app-slot:nth-child(4n + 3) { --app-ink: #717b92; --app-tint: #e5e7ee; }
.app-slot:hover {
  transform: translateY(-3px);
  border-color: #f3d9de;
  box-shadow: 0 11px 23px #606e8a2c, inset 0 0 0 1px #fff7;
}
.app-slot-link {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: inherit;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}
.app-slot-link:focus-visible { outline-offset: 2px; }

.app-art {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: clamp(.65rem, 1.4vw, 1.2rem);
  color: var(--app-ink);
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 23%, #ffffff89 23.5% 24%, transparent 24.5% 34%),
    radial-gradient(circle, #a2acc23b 1px, transparent 1.5px) 0 0 / 11px 11px,
    linear-gradient(138deg, #fdfdff, var(--app-tint));
}
.app-art svg {
  width: min(66%, 5.5rem);
  aspect-ratio: 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65px;
  transition: transform .32s ease;
}
.app-slot:hover svg { transform: scale(1.06) translateY(-1px); }
.app-copy {
  align-self: center;
  padding: .65rem clamp(.65rem, 1.4vw, 1.45rem);
  font-size: clamp(1rem, 1.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -.026em;
  line-height: 1.16;
}
.app-copy small {
  display: block;
  margin-top: .48rem;
  color: #686f80;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .025em;
}

@media (max-width: 880px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .apps { align-items: start; }
  .app-slot { grid-template-columns: 1fr; }
  .app-art { min-height: 4.15rem; }
  .app-art svg { width: min(62%, 3.65rem); }
}

.rail {
  --rail-width: clamp(5.4rem, 7.84cqw, 10rem);
  --rail-tab: clamp(1.9rem, 2.43cqw, 2.8rem);
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  z-index: 2;
  pointer-events: none;
}

.rail-panel {
  position: absolute;
  inset: 0;
  transform: translateX(calc(-100% - 36px));
  transition: transform .48s cubic-bezier(.22, .75, .24, 1);
}

.rail.is-open .rail-panel { transform: translateX(0); pointer-events: auto; }

.rail-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(.62cqw 0 1.05cqw #936a7b40) drop-shadow(.7cqw 0 1.55cqw #9878871a);
}

.rail-links {
  position: absolute;
  inset: 31.16% auto auto 0;
  width: 98%;
  height: 26.1%;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
}

.rail-link {
  display: grid;
  place-items: center;
  margin: auto;
  width: clamp(2.75rem, 3.45cqw, 4rem);
  height: clamp(2.75rem, 3.45cqw, 4rem);
  border-radius: 25%;
  color: #fff6f2;
  transition: background .18s ease, transform .18s ease;
}

.rail-link svg { width: 80%; height: 80%; }
.rail-link[aria-label="Apps"] svg { width: 72%; height: 72%; }
.rail-link[aria-current] { color: #fff8f6; filter: drop-shadow(0 0 .57cqw #ffd4d6b0); }
.rail-link[aria-current="location"]::after {
  content: "";
  position: absolute;
  left: -.18rem;
  width: 3px;
  height: 31%;
  border-radius: 999px;
  background: #fff1f3;
  opacity: .75;
}
.rail-link { position: relative; }
.rail-link:hover, .rail-profile:hover { transform: scale(1.08); background-color: #ffffff24; }
.rail-link:active, .rail-profile:active { transform: scale(.94); }
.rail-link:focus-visible, .rail-profile:focus-visible, .rail-toggle:focus-visible { outline-color: #fff; outline-offset: -3px; }

.rail-divider {
  position: absolute;
  top: 60.78%;
  left: 21.8%;
  width: 53.7%;
  height: 1px;
  background: #ffe1df9c;
}

.rail-profile {
  display: grid;
  place-items: center;
  position: absolute;
  top: 91.83%;
  left: 39%;
  translate: -50% -50%;
  width: clamp(2.75rem, 3.64cqw, 4.25rem);
  aspect-ratio: 1;
  color: #fce8e9;
  background: linear-gradient(145deg, #ffafb6a6, #ffccd878);
  border: max(1px, .105cqw) solid #fff1ed;
  border-radius: 50%;
  transition: background .18s ease, transform .18s ease;
}

.rail-profile svg { width: 83%; height: 83%; }

.rail-toggle {
  position: absolute;
  top: 44.3%;
  left: 0;
  width: var(--rail-tab);
  height: clamp(3.6rem, 5.8cqw, 6rem);
  padding: 0;
  display: grid;
  place-items: center;
  translate: 0 -50%;
  color: white;
  background: linear-gradient(155deg, #ed8a8e, #df6c71 62%, #cf777b);
  border: 1px solid #fff9;
  border-left: 0;
  border-radius: 0 .95rem .95rem 0;
  box-shadow: 3px 3px 14px #95606f42;
  pointer-events: auto;
  transition: left .48s cubic-bezier(.22, .75, .24, 1), top .48s cubic-bezier(.22, .75, .24, 1), opacity .22s ease, background .22s ease;
}

.rail-toggle svg { width: 65%; max-width: 23px; transition: transform .4s ease; }
.rail.is-open .rail-toggle {
  top: 20%;
  left: calc(var(--rail-width) * .79 - var(--rail-tab) - 3px);
  border-color: transparent;
  border-radius: .65rem;
  background: #fff0;
  box-shadow: none;
}
.rail.is-open .rail-toggle svg { transform: rotate(180deg); }
.rail.is-open .rail-toggle:hover { background: #fff2; }

@media (hover: hover) and (pointer: fine) {
  .rail.is-open .rail-toggle { opacity: 0; }
  .rail.is-open:hover .rail-toggle, .rail.is-open .rail-toggle:focus-visible { opacity: 1; }
}

.panel {
  width: min(28rem, calc(100% - 2rem));
  padding: 2.2rem;
  border: 1px solid #fff;
  border-radius: 1.65rem;
  background: #fdfdfe;
  color: inherit;
  box-shadow: 0 16px 65px #33394f40;
}

.panel[open] { animation: panel-enter .2s ease both; }
.panel::backdrop { background: #52576f35; backdrop-filter: blur(4px); }
.panel h2 { margin: 0 2rem 1rem 0; }
.panel p { margin: 0; line-height: 1.5; }
#updates { max-height: calc(100dvh - 2rem); overscroll-behavior: contain; }
.updates-list { display: grid; gap: 1rem; padding: 0; margin: 0; list-style: none; }
.updates-list li { padding-inline-start: .9rem; border-inline-start: 2px solid #dda1a8; }
.updates-list time { color: #87444e; font-size: .82rem; font-weight: 700; }
.updates-list h3 { margin: .25rem 0 .35rem; font-size: 1.08rem; }
.panel-policy { width: min(44rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); }
.panel-policy[open] { display: flex; flex-direction: column; }
.policy-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .65rem;
  scrollbar-gutter: stable;
}
.policy-content:focus-visible { outline-offset: -2px; }
.policy-content h3 { margin: 1.35rem 0 .5rem; font-size: 1.05rem; }
.policy-content p + p { margin-top: .75rem; }
.policy-content a { color: #853238; overflow-wrap: anywhere; }
.panel-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  aspect-ratio: 1;
  background: #eeeff3;
  color: inherit;
  border: 0;
  border-radius: 50%;
}
.panel-close:hover { background: #e2e3e9; }
.panel-close svg { width: 1.25rem; }
.panel-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  width: fit-content;
  padding: .65rem 1.15rem;
  color: #fff;
  background: #a2383c;
  border: 0;
  border-radius: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.panel-action:hover { background: #842e31; }
@keyframes panel-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.games-library {
  width: min(59rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 4vw, 2.9rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: clamp(1.4rem, 4vw, 2.65rem);
  background: radial-gradient(ellipse at 89% 7%, #f6dadd75, transparent 43%),
              radial-gradient(ellipse at 2% 96%, #dbe1f2a8, transparent 48%),
              linear-gradient(155deg, #fffffff5, #f5f6faf2);
  box-shadow: 0 30px 100px #303b5945, 0 4px 15px #38425b18, inset 0 1px 2px #fff;
  opacity: 0;
  transform: translateY(14px) scale(.975);
  transition: opacity .24s ease, transform .32s cubic-bezier(.2, .75, .25, 1);
  transition: opacity .24s ease, transform .32s cubic-bezier(.2, .75, .25, 1),
              display .32s allow-discrete, overlay .32s allow-discrete;
}

.games-library[open] { animation: none; opacity: 1; transform: none; }
.games-library::backdrop {
  background: #4b567331;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .25s ease;
  transition: opacity .25s ease, display .32s allow-discrete, overlay .32s allow-discrete;
}
.games-library[open]::backdrop { opacity: 1; }

@starting-style {
  .games-library[open] { opacity: 0; transform: translateY(14px) scale(.975); }
  .games-library[open]::backdrop { opacity: 0; }
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: clamp(.9rem, 2.8vw, 1.85rem);
}

.library-label, .library-footer {
  font-family: "Courier New", monospace;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #5f6577;
}

.library-header h2 {
  margin: .28rem 0 0;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: .98;
  letter-spacing: -.075em;
  color: #323847;
}

.library-header .panel-close {
  position: static;
  flex: none;
  border: 1px solid #fff;
  background: #ffffff95;
  box-shadow: 0 3px 10px #414c691c;
  transition: background .2s ease, transform .2s ease;
}
.library-header .panel-close:hover { background: #fff; transform: rotate(8deg); }
.library-header .panel-close:active { transform: scale(.94); }

.library-feature {
  display: grid;
  grid-template-columns: 1.23fr 1fr;
  padding: .45rem;
  border: 1px solid #fff;
  border-radius: 1.62rem;
  background: linear-gradient(138deg, #fff, #f8f8fb 62%, #edeff6);
  box-shadow: 0 12px 30px #58658228, 0 1px 3px #38436a17;
  transition: transform .3s ease, box-shadow .3s ease;
}

.library-art {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 1.18rem;
  background: radial-gradient(ellipse at 82% 15%, #f8dcdf, transparent 57%),
              radial-gradient(ellipse at 40% 42%, #f9fbff, #ccd4e5);
}

.library-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.timing-face { filter: drop-shadow(0 11px 12px #53648f32); transition: transform .42s ease; }
.timing-needle { transform-origin: 225px 159px; transition: transform .55s cubic-bezier(.22, .72, .22, 1); }
.library-feature:is(:hover, :focus-within) { transform: translateY(-3px); box-shadow: 0 19px 36px #58658232, 0 1px 3px #38436a17; }
.library-feature:is(:hover, :focus-within) .timing-face { transform: translateY(-3px); }
.library-feature:is(:hover, :focus-within) .timing-needle { transform: rotate(-12deg); }

.library-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.2rem, 3.5vw, 2.9rem);
}

.game-category {
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #f4e4e7;
  color: #903d49;
}
.library-details h3 {
  margin: .75rem 0 .6rem;
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  line-height: .99;
  letter-spacing: -.061em;
  color: #343a47;
  text-wrap: balance;
}
.library-details .game-description { color: #5d6476; font-size: clamp(.95rem, 2vw, 1.08rem); }

.library-play {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  min-height: 2.85rem;
  margin-top: 1.3rem;
  padding: .45rem .52rem .45rem 1.1rem;
  border: 1px solid #ffffff6b;
  border-radius: 999px;
  background: linear-gradient(145deg, #ad505c, #913744);
  box-shadow: 0 4px 12px #9b4f5b44, inset 0 1px 2px #ffffff33;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.library-play svg { width: 1.82rem; padding: .32rem; border-radius: 50%; background: #ffffff2b; transition: transform .2s ease; }
.library-play:hover { box-shadow: 0 7px 16px #9b4f5b66; transform: translateY(-2px); }
.library-play:hover svg { transform: translateX(2px); }
.library-play:active { transform: scale(.97); }

.library-footer { display: flex; align-items: center; gap: .75rem; margin-top: 1.2rem; }
.library-footer::before { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #d9dfeb00, #b3bacd); }

@media (max-width: 40rem) {
  .library-feature { grid-template-columns: minmax(0, 1fr); }
  .library-art { min-height: clamp(8.75rem, 42vw, 14rem); }
  .library-details { padding: 1.1rem .9rem; }
  .library-details h3 { text-wrap: initial; }
}

@media (max-aspect-ratio: 6/5) {
  .scene { background-size: 155% 100%; }
  .ribbons { inset: 27% -17% 43%; }
  .globe { left: 61%; top: 9%; width: 56%; height: 49%; }
  .wordmark { --logo-size: 12.4cqw; top: 32%; height: 16cqw; }
  .wordmark-name { right: 36.7%; }
  .wordmark-badge { left: 64%; width: 25.2%; border-radius: 4cqw; }
  .tagline { top: calc(32% + 17.7cqw); font-size: clamp(1rem, 3.5cqw, 2.1rem); }
  .actions {
    inset: max(60%, calc(34% + 26cqw)) 12% auto;
    grid-template-columns: 1fr 1fr;
    gap: clamp(.75rem, 2cqw, 1.1rem);
  }
  .action { min-height: clamp(3.05rem, 9cqw, 4.7rem); gap: clamp(.4rem, 2cqw, 1rem); padding: 0 .5rem; font-size: clamp(1rem, 3.1cqw, 1.7rem); }
  .action svg { width: clamp(1.55rem, 4.7cqw, 2.45rem); height: auto; aspect-ratio: 1; }
}

@media (max-width: 560px) {
  .home { background-size: auto, 1.2rem 1.2rem; }
  .scene { background-size: 190% 100%; }
  .globe { left: 53%; top: 9%; width: 76%; height: 49%; }
  .ribbons { inset: 27% -20% 46%; }
  .action { box-shadow: 0 3px 7px #555c7436, 0 8px 16px #656b851e; }
  .rail-profile { top: min(91.83%, calc(100% - 2rem - env(safe-area-inset-bottom))); }
}

@media (max-height: 500px) and (min-aspect-ratio: 3/2) {
  .home { min-height: max(23rem, 48vw); }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
