:root {
  color-scheme: dark;
  --ink: #f9e9bf;
  --stage-width: min(360px, calc(100vw - 12px));
  font-family: sans-serif;
  color: var(--ink);
  background: #11182b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 6px;
  isolation: isolate;
  background: #141c34;
  image-rendering: pixelated;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0 50% 0 0;
  z-index: -1;
  background: #141c34 url('assets/night-sky.webp') right bottom / 720px 1280px
    no-repeat;
}

body::after {
  inset-inline: 50% 0;
  transform: scaleX(-1);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #fff2c5;
  outline-offset: 3px;
}

h1,
h2,
p,
figure {
  margin: 0;
}

button,
.language {
  min-height: 44px;
  min-width: 44px;
}

.stage {
  isolation: isolate;
  position: relative;
  width: var(--stage-width);
  aspect-ratio: 9 / 16;
  background: #17234a url('assets/night-sky.webp') no-repeat center bottom;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #b39870,
    0 0 0 4px #27273a;
}

.hud {
  position: absolute;
  z-index: 1;
  inset: 8px 8px auto;
  display: flex;
  align-items: stretch;
  gap: 3px;
}

.wood,
.language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: url('assets/wood-plaque.png') no-repeat center;
  background-size: 100% 32px;
  color: #33202c;
  font-size: 13px;
  font-weight: 700;
  padding: 0 8px;
  text-decoration: none;
}

.brand {
  flex: 1 0 max-content;
  font-size: 15px;
}

.open-launch {
  flex: 0 1 130px;
}

.language {
  flex: 0 0 44px;
  background: #1f2a4a;
  color: #f9e9bf;
  border: 1px solid #8c7691;
}

.floating-islands {
  position: absolute;
  inset: 51px auto auto 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 480px;
  pointer-events: none;
}

.building {
  position: absolute;
  place-items: center;
  display: grid;
  width: 70px;
  height: 70px;
  background: none;
  padding: 0;
}

.building img {
  display: block;
  width: 58px;
  height: 58px;
}

.building:hover img,
.building:focus-visible img {
  filter: drop-shadow(1px 0 #fff0bf) drop-shadow(-1px 0 #fff0bf)
    drop-shadow(0 -1px #fff0bf);
}

.building-name {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  bottom: -0.6rem;
  padding: 0 0.4rem;
  white-space: nowrap;
  color: #fff3d6;
  background: #312842;
  border-bottom: 1px solid #ad8e76;
  font-size: 13px;
  z-index: 2;
}

.building:hover .building-name,
.building:focus-visible .building-name {
  opacity: 1;
}

.castle {
  top: 37%;
  left: calc(50% - 42px);
  width: 84px;
  height: 80px;
}

.castle img {
  width: 58px;
  height: 58px;
}

.tower {
  top: 23%;
  right: 10%;
}

.gacha {
  top: 49%;
  right: 7%;
}

.guild {
  top: 48%;
  left: 8%;
}

.hanging {
  background: url('assets/hanging-sign.png') no-repeat center;
  background-size: 96px 72px;
  font-size: 13px;
  font-weight: 700;
  color: #f9e9bf;
  text-shadow: 1px 1px #112039;
}

.island-scroll {
  position: absolute;
  top: 68%;
  left: 31%;
  width: 134px;
  height: 72px;
}

:root {
  --paper: #f6edd1;
  --paper-ink: #25213a;
  --paper-link: #44265e;
  --paper-note: #574459;
}

.home {
  min-height: calc(100svh - 12px);
  display: grid;
  place-items: center;
}

.tagline {
  position: absolute;
  inset: auto 42px 8%;
  padding: 0.4rem 0.55rem;
  color: #fff3d6;
  background: #252a47;
  border-bottom: 2px solid #9c8264;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.island-scroll {
  padding-inline: 19px;
  line-height: 1.15;
}

.site-footer {
  width: min(42rem, 100%);
  padding: 8px 12px 20px;
  color: #f9e9bf;
  background: #202945;
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
  overflow-wrap: anywhere;
}

.brand-footer .policy-links,
.policy-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-footer {
  text-align: center;
  overflow-wrap: anywhere;
}

.brand-footer .policy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
}

.brand-footer .footer-email,
.brand-footer .footer-copyright {
  margin: 0.45em 0 0;
}

.site-footer a,
.policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 0.2em;
}

.paper-panel {
  box-sizing: border-box;
  width: min(624px, calc(100vw - 16px));
  max-width: none;
  max-height: min(704px, calc(100svh - 26px));
  padding: 0;
  color: var(--paper-ink);
  color-scheme: light;
  background: var(--paper);
  background-clip: padding-box;
  border: solid transparent;
  border-width: 22px 16px 18px;
  border-image: url('assets/dialog.png') 36 28 25 28 stretch;
  box-shadow: 5px 5px #111324;
}

.paper-panel[open],
.reading-page .paper-panel {
  display: flex;
  flex-direction: column;
}

.paper-panel::backdrop {
  background: #111321b8;
}

.paper-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 4px;
  border-bottom: 1px solid #987b70;
}

.paper-header h1,
.paper-header h2 {
  font-size: clamp(20px, 4vw, 24px);
  line-height: 1.3;
  margin: 5px 0;
}

.paper-action {
  display: inline-flex;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  gap: 9px;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 8px;
  background: var(--paper);
  color: var(--paper-link);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.paper-actions {
  display: flex;
}

.paper-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px 16px 18px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.paper-content h2 {
  font-size: 18px;
  line-height: 1.45;
  margin: 1.15em 0 0.4em;
}

.paper-content p + p {
  margin-top: 0.75em;
}

.paper-content ul.features {
  padding-inline-start: 1.3em;
  margin: 0.8em 0;
}

.paper-content li + li {
  margin-top: 0.3em;
}

.paper-content .policy-links li + li {
  margin-top: 0;
}

.paper-content a {
  color: var(--paper-link);
  text-underline-offset: 0.18em;
}

.paper-panel :focus-visible {
  outline: 2px solid var(--paper-link);
  outline-offset: -2px;
}

.paper-note {
  color: var(--paper-note);
}

.paper-note:empty {
  display: none;
}

.paper-content footer {
  margin-top: 1.25em;
  padding-top: 0.75em;
  border-top: 1px solid #987b70;
}

.media-preview {
  display: block;
  max-width: min(100%, 228px);
  height: auto;
  margin: 0.9em auto 0;
}

.reading-page::after {
  background-image: url('assets/night-sky.webp');
}

.reading-scene {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  width: var(--stage-width);
  aspect-ratio: 9 / 16;
  background: #17234a url('assets/islands.webp') center no-repeat;
  pointer-events: none;
}

.reading-page {
  background-color: #141c34;
}

.reading-page main {
  display: contents;
}

.reading-page .paper-panel {
  height: min(704px, calc(100svh - 26px));
}

@media (min-width: 600px) {
  .paper-content {
    padding-inline: 24px;
  }
}

.reading-page.pricing-page .paper-panel {
  height: auto;
  max-height: none;
  margin-block: 8px 14px;
}

.pricing-page .paper-content {
  overflow: visible;
  padding-top: 4px;
}

.pricing-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-bottom: 8px;
}

.pricing-languages a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

.pricing-languages [aria-current='page'] {
  font-weight: 700;
}

.pricing-status {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-inline-start: 3px solid #8b611d;
  background: #f4e4bf;
  font-weight: 700;
}

.pricing-currency {
  color: var(--paper-note);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.pricing-table th,
.pricing-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #a58a76;
  text-align: start;
}

.pricing-table th:last-child,
.pricing-table td:last-child {
  text-align: end;
}

.pricing-table thead {
  background: #ead8b8;
}

.pricing-bonus {
  margin-top: 0.7em;
}

.pricing-pass-rate {
  font-size: 1.15em;
}

.compliance-notices {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.home > .compliance-notices,
.home-announcements {
  max-width: var(--stage-width);
  margin-top: 8px;
  background: #202945;
  color: #f9e9bf;
}

.compliance-notices p + p {
  margin-top: 6px;
}

.game-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.game-entry a,
.pricing-disclosures a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.rating-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
}

.site-pending {
  color: #671d05;
  background: #ffdf9c;
  padding-inline: 0.15em;
}

.operator-details {
  margin: 0.5em 0;
}

.operator-details > div {
  display: grid;
  grid-template-columns: minmax(5.5em, max-content) minmax(0, 1fr);
  gap: 0.5em;
  padding-block: 0.25em;
}

.operator-details dd {
  margin: 0;
}

.odds-page .paper-header {
  flex-wrap: wrap;
}

.odds-pool table {
  margin-top: 0.8em;
}

.odds-table .odds-subtotal {
  color: #39251c;
  background: #dfc5a5;
}

.odds-subtotal td {
  font-weight: 700;
}

.odds-table td:last-child {
  white-space: nowrap;
}

.odds-pool caption {
  text-align: start;
  font-weight: 700;
}

.building.gacha {
  text-decoration: none;
}

.home-announcements {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-preview-banner {
  width: 100%;
  padding: 8px 12px;
  border-inline-start: 3px solid #8b611d;
  background: #f4e4bf;
  color: #392914;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

body > .legal-preview-banner {
  max-width: var(--stage-width);
  margin-bottom: 8px;
}

.privacy-pending {
  padding: 8px 10px;
  border-inline-start: 3px solid #8b611d;
  background: #f4e4bf;
}

.paper-language {
  max-width: 7rem;
  align-self: center;
  min-height: 44px;
  border: 1px solid #987b70;
  border-radius: 4px;
  padding: 0 6px;
  background: var(--paper);
  color: var(--paper-link);
  font: inherit;
  font-size: 14px;
}
