:root {
  color-scheme: dark;
  --bg: #050508;
  --ink: #f1ede4;
  --muted: rgba(241, 237, 228, .68);
  --line: rgba(226, 191, 116, .28);
  --gold: #d8b76a;
  --cyan: #5be7f1;
  --rose: #ff8fc9;
  --green: #73e2a7;
  --violet: #b28cff;
  --panel: rgba(10, 14, 21, .74);
  --panel-strong: rgba(7, 10, 16, .92);
  font-family: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 4%, rgba(91, 231, 241, .18), transparent 27rem),
    radial-gradient(circle at 88% 12%, rgba(255, 143, 201, .15), transparent 28rem),
    linear-gradient(180deg, #030407 0%, #080a10 50%, #030407 100%);
  color: var(--ink);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px max(18px, env(safe-area-inset-left)) 12px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(216, 183, 106, .2);
  background: rgba(3, 4, 7, .78);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.brand span {
  color: var(--gold);
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: .32em;
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .28em;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  text-decoration: none;
  letter-spacing: .16em;
  font-size: 12px;
}

.play-shell {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(310px, 1fr) minmax(230px, 330px);
  gap: 18px;
  padding: 18px;
}

.world-rail,
.status-panel {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.world-rail {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.world-tab {
  position: relative;
  min-height: 92px;
  padding: 13px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  text-align: left;
  cursor: pointer;
}

.world-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .24;
  background: radial-gradient(circle at 80% 20%, var(--accent), transparent 42%);
}

.world-tab.active {
  border-color: color-mix(in srgb, var(--accent) 60%, white 15%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 26px color-mix(in srgb, var(--accent) 22%, transparent);
}

.world-tab span,
.world-tab b,
.world-tab small {
  position: relative;
}

.world-tab span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .24em;
}

.world-tab b {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  letter-spacing: .08em;
}

.world-tab small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.stage-area {
  display: grid;
  place-items: center;
  min-height: 620px;
}

.phone-frame {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 9 / 17.6;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 36px;
  background: linear-gradient(145deg, #1d2028, #050508 45%, #17191f);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .04);
}

.phone-speaker {
  position: absolute;
  left: 50%;
  top: 13px;
  z-index: 4;
  width: 94px;
  height: 21px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background: #050508;
}

#sensiaCanvas {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: #020306;
  touch-action: none;
}

.phone-hud {
  position: absolute;
  top: 26px;
  right: 28px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.icon-btn,
.mode-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 183, 106, .48);
  border-radius: 50%;
  background: rgba(3, 4, 7, .62);
  color: var(--ink);
  cursor: pointer;
}

.mode-row {
  position: absolute;
  left: 31px;
  right: 31px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.mode-btn {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(3, 4, 7, .58);
}

.mode-btn.active {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(216, 183, 106, .3);
}

.status-panel {
  padding: 22px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: .28em;
  font-size: 12px;
}

.status-panel h1,
.section-heading h2,
.hero-copy h2 {
  margin: 0;
  font-weight: 400;
  letter-spacing: .08em;
}

.status-panel h1 {
  font-size: clamp(32px, 6vw, 48px);
}

.status-panel p {
  min-height: 4.8em;
  color: var(--muted);
  line-height: 1.8;
}

.meter {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.meter span,
.meter b {
  font-size: 12px;
  letter-spacing: .16em;
}

.meter i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
}

.meter em {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--rose));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stats-grid div,
.collection-item,
.release-grid article,
.loop-step {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
}

.stats-grid div {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 4px;
}

.stats-grid span {
  color: var(--gold);
  font-size: 24px;
}

.stats-grid small,
.collection-item small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
}

.collection-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.collection-item {
  padding: 10px 12px;
}

.collection-item b {
  display: block;
  font-weight: 400;
}

.lp-hero {
  position: relative;
  min-height: min(780px, calc(100vh - 68px));
  display: grid;
  align-items: end;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.lp-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 4, 7, .9), rgba(3, 4, 7, .35) 62%, rgba(3, 4, 7, .65));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 36px));
  margin: 0 0 7vh max(18px, 6vw);
}

.hero-copy h2 {
  font-size: clamp(38px, 8vw, 92px);
  line-height: 1.12;
}

.hero-copy p:not(.kicker) {
  max-width: 630px;
  color: var(--ink);
  line-height: 2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}

.world-showcase,
.infographic {
  padding: 78px 18px;
}

.section-heading {
  width: min(1120px, 100%);
  margin: 0 auto 28px;
}

.section-heading h2 {
  font-size: clamp(32px, 5vw, 60px);
}

.world-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.world-grid article {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.world-grid img {
  height: 260px;
  width: 100%;
  object-fit: cover;
}

.world-grid h3,
.world-grid p {
  margin-left: 14px;
  margin-right: 14px;
}

.world-grid h3 {
  color: var(--gold);
  letter-spacing: .12em;
}

.world-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.info-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, .8fr);
  gap: 16px;
  align-items: stretch;
}

.info-visual {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.loop-panel {
  display: grid;
  gap: 10px;
}

.loop-step {
  min-height: 118px;
  padding: 18px;
}

.loop-step b {
  color: var(--gold);
  font-size: 28px;
}

.loop-step span {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.loop-step small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.release-grid {
  width: min(1180px, 100%);
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.release-grid article {
  padding: 20px;
}

.release-grid h3 {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: .12em;
}

.release-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.rare-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 40;
  max-width: calc(100% - 36px);
  transform: translateX(-50%) translateY(16px);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 4, 7, .88);
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.rare-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1050px) {
  .play-shell {
    grid-template-columns: 1fr;
  }

  .world-rail {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .stage-area {
    min-height: auto;
  }

  .phone-frame {
    width: min(100%, 390px);
  }

  .world-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-layout,
  .release-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
  }

  .play-shell {
    padding: 10px;
  }

  .world-rail {
    margin: 0 -10px;
    padding: 10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .phone-frame {
    border-radius: 28px;
    padding: 10px;
  }

  #sensiaCanvas {
    border-radius: 20px;
  }

  .status-panel {
    padding: 18px;
  }

  .world-grid {
    grid-template-columns: 1fr;
  }

  .world-grid article {
    min-height: 0;
  }

  .hero-copy {
    margin-left: 18px;
  }

  .lp-hero {
    min-height: 680px;
  }
}

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