:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --bg-soft: #eef4f8;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --text: #17202a;
  --muted: #5f6f7d;
  --line: rgba(27, 64, 96, 0.16);
  --gold: #c99a35;
  --gold-bright: #e2bd68;
  --blue: #1f7fb8;
  --blue-deep: #16486f;
  --green: #27875b;
  --red: #b93e35;
  --ink: #071017;
  --shadow: 0 28px 80px rgba(25, 58, 86, 0.16);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body::before {
  background:
    linear-gradient(90deg, rgba(22, 72, 111, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22, 72, 111, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  content: "";
  inset: 0;
  opacity: 0.38;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  padding: 14px clamp(18px, 4vw, 56px);
  position: fixed;
  right: 0;
  top: 0;
  transition: background 180ms ease, box-shadow 180ms ease;
  z-index: 30;
}

.site-header[data-scrolled="true"] {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 40px rgba(25, 58, 86, 0.12);
}

.brand,
.nav,
.hero-actions,
.hero-bottom,
.play-actions,
.shop-toolbar,
.cart-row,
.footer {
  align-items: center;
  display: flex;
}

.brand {
  color: var(--blue-deep);
  gap: 10px;
  font-weight: 1000;
  letter-spacing: 0;
}

.brand-mark {
  background: linear-gradient(180deg, #fff, #e8f0f6);
  border: 1px solid rgba(201, 154, 53, 0.5);
  color: var(--gold);
  display: grid;
  height: 38px;
  place-items: center;
  width: 38px;
}

.nav {
  gap: clamp(14px, 2.5vw, 30px);
  justify-content: center;
}

.nav a,
.header-action,
.kicker,
.button,
.race-tab,
.mode,
.item-tag {
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  padding: 10px 0;
}

.nav a:hover {
  color: var(--blue-deep);
}

.header-action {
  background: var(--blue-deep);
  color: #fff;
  padding: 12px 16px;
}

.hero {
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  padding: 118px clamp(20px, 6vw, 88px) 96px;
  position: relative;
}

.hero-media,
.hero-shade {
  inset: 0;
  position: absolute;
}

.hero-media {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(247, 249, 251, 0.98) 0%, rgba(247, 249, 251, 0.78) 35%, rgba(247, 249, 251, 0.18) 72%, rgba(247, 249, 251, 0.02) 100%),
    linear-gradient(180deg, rgba(247, 249, 251, 0.04) 0%, rgba(247, 249, 251, 0.18) 68%, #f7f9fb 100%);
}

.hero-content {
  align-self: center;
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.kicker {
  color: var(--gold);
  letter-spacing: 0;
  margin: 0 0 14px;
}

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

h1 {
  color: var(--blue-deep);
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: 0.78;
  margin: 0 0 24px;
  text-shadow: 0 8px 0 rgba(255, 255, 255, 0.8);
}

h2 {
  color: var(--blue-deep);
  font-size: clamp(2.35rem, 5.7vw, 5.4rem);
  line-height: 0.95;
  margin-bottom: 18px;
}

.hero-lead {
  color: #26394b;
  font-size: clamp(1.05rem, 2.2vw, 1.38rem);
  line-height: 1.9;
  max-width: 680px;
}

.button {
  border: 1px solid transparent;
  min-height: 52px;
  padding: 15px 24px;
}

.button.primary {
  background: linear-gradient(180deg, #f1cf80, var(--gold));
  color: #17202a;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(31, 127, 184, 0.24);
  color: var(--text);
  display: inline-flex;
  gap: 12px;
}

.button.secondary strong {
  color: var(--blue-deep);
}

.hero-actions,
.play-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-bottom {
  align-self: end;
  border-top: 1px solid rgba(31, 127, 184, 0.22);
  gap: clamp(20px, 5vw, 68px);
  margin-top: 54px;
  max-width: 920px;
  padding-top: 24px;
  position: relative;
  z-index: 1;
}

.hero-bottom span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.hero-bottom strong {
  color: var(--blue-deep);
  display: block;
  font-size: clamp(1rem, 2vw, 1.45rem);
  margin-top: 5px;
}

.news-band,
.world-feature,
.champion-section,
.regions,
.mode-section,
.map-section,
.shop-section,
.play-section {
  padding: clamp(70px, 10vw, 128px) clamp(20px, 6vw, 88px);
}

.section-title {
  margin-bottom: 34px;
}

.section-title.centered {
  margin-left: auto;
  margin-right: auto;
  max-width: 840px;
  text-align: center;
}

.section-title p {
  color: var(--muted);
  line-height: 1.8;
}

.news-band {
  background: #ffffff;
}

.news-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-list article {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: 0 16px 46px rgba(25, 58, 86, 0.08);
  min-height: 360px;
  overflow: hidden;
}

.news-list img {
  display: block;
  height: 190px;
  object-fit: cover;
  width: 100%;
}

.news-list article:nth-child(3) img {
  background: #f3f7fa;
  image-rendering: pixelated;
  object-fit: contain;
  padding: 46px;
}

.news-list div {
  padding: 24px;
}

.news-list span,
.race-copy > p:first-child,
.item-tag,
.price {
  color: var(--gold);
  font-weight: 1000;
  text-transform: uppercase;
}

.news-list h3 {
  color: var(--blue-deep);
  font-size: 1.45rem;
  margin: 12px 0;
}

.news-list p,
.feature-copy p,
.region-grid p,
.mode-copy p,
.play-section p,
.shop-copy p,
.item-card p,
.map-copy p {
  color: var(--muted);
  line-height: 1.85;
}

.world-feature,
.mode-section {
  align-items: center;
  display: grid;
  gap: clamp(28px, 6vw, 76px);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.feature-visual,
.mode-image {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-visual img,
.mode-image img {
  display: block;
  height: min(62vw, 620px);
  object-fit: cover;
  width: 100%;
}

.champion-section,
.map-section {
  background: linear-gradient(180deg, #f7fbff 0%, #eef6fb 100%);
}

.race-tabs,
.mode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0 auto 28px;
}

.race-tab,
.mode {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  min-height: 44px;
  padding: 11px 16px;
}

.race-tab.active,
.mode.active {
  background: var(--blue-deep);
  color: #fff;
}

.race-panel {
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 246, 251, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: clamp(22px, 4vw, 42px);
  grid-template-columns: 118px minmax(0, 1fr) minmax(180px, 280px);
  margin: 0 auto;
  max-width: 1080px;
  padding: clamp(24px, 4vw, 42px);
}

.race-emblem {
  aspect-ratio: 1;
  background: linear-gradient(180deg, #ffffff, #e7f1f7);
  border: 1px solid rgba(201, 154, 53, 0.4);
  color: var(--gold);
  display: grid;
  font-size: 4rem;
  font-weight: 1000;
  place-items: center;
}

.race-copy h3 {
  color: var(--blue-deep);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 12px;
}

.race-traits {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.race-traits li,
.cart-row {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.regions {
  background: #ffffff;
}

.region-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.region-grid article {
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
  border: 1px solid var(--line);
  min-height: 260px;
  padding: 26px;
}

.region-grid span {
  color: rgba(201, 154, 53, 0.42);
  font-size: 3rem;
  font-weight: 1000;
}

.region-grid h3 {
  color: var(--blue-deep);
}

.mode-section {
  background: #f7f9fb;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
}

.map-layout {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.map-board {
  background:
    linear-gradient(145deg, rgba(31, 127, 184, 0.18), rgba(255, 255, 255, 0.76)),
    url("assets/hero-campanella-sacred.png") center/cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.map-board::after {
  background: rgba(255, 255, 255, 0.54);
  content: "";
  inset: 0;
  position: absolute;
}

.map-route {
  border: 5px solid var(--red);
  border-left-color: transparent;
  border-radius: 48% 52% 54% 46%;
  height: 72%;
  left: 20%;
  position: absolute;
  top: 15%;
  transform: rotate(15deg);
  width: 62%;
  z-index: 1;
}

.map-pin {
  align-items: center;
  background: #ffffff;
  border: 2px solid rgba(23, 32, 42, 0.2);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(25, 58, 86, 0.18);
  color: var(--ink);
  display: flex;
  font-weight: 1000;
  height: 38px;
  justify-content: center;
  position: absolute;
  width: 38px;
  z-index: 2;
}

.map-pin:nth-child(2) { left: 34%; top: 41%; }
.map-pin:nth-child(3) { left: 43%; top: 40%; }
.map-pin:nth-child(4) { left: 43%; top: 49%; }
.map-pin:nth-child(5) { left: 64%; top: 30%; }
.map-pin:nth-child(6) { left: 13%; top: 24%; }
.map-pin:nth-child(7) { left: 10%; top: 73%; }
.map-pin:nth-child(8) { left: 49%; top: 10%; }
.map-pin:nth-child(9) { left: 78%; top: 61%; }
.map-pin:nth-child(10) { left: 76%; top: 20%; }
.map-pin:nth-child(11) { left: 34%; top: 76%; }
.map-pin:nth-child(12) { left: 76%; top: 80%; }
.map-pin:nth-child(13) { left: 58%; top: 64%; }

.map-list {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 22px;
}

.map-list li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding-bottom: 10px;
}

.map-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.map-list span {
  align-items: center;
  background: var(--blue-deep);
  color: #fff;
  display: inline-flex;
  flex: 0 0 30px;
  font-weight: 1000;
  height: 30px;
  justify-content: center;
}

.shop-section {
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fb 100%);
}

.shop-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.shop-toolbar {
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.points-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  min-width: 220px;
  padding: 18px;
}

.points-card span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.points-card strong {
  color: var(--blue-deep);
  display: block;
  font-size: 2.25rem;
  line-height: 1;
  margin-top: 6px;
}

.item-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.item-card {
  background: linear-gradient(180deg, #ffffff, #f6f9fb);
  border: 1px solid var(--line);
  display: grid;
  min-height: 330px;
  padding: 22px;
}

.item-icon {
  align-items: center;
  background: linear-gradient(135deg, rgba(201, 154, 53, 0.16), rgba(31, 127, 184, 0.12));
  border: 1px solid rgba(201, 154, 53, 0.36);
  color: var(--gold);
  display: flex;
  font-size: 2rem;
  font-weight: 1000;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.item-card h3 {
  color: var(--blue-deep);
  font-size: 1.35rem;
  margin: 18px 0 10px;
}

.item-card footer {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: auto;
}

.buy-button,
.grant-button,
.clear-button {
  border: 0;
  font-weight: 1000;
  min-height: 42px;
  padding: 10px 14px;
}

.buy-button,
.grant-button {
  background: var(--blue-deep);
  color: #fff;
}

.clear-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 100%;
}

.shop-panel {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  height: max-content;
  padding: 22px;
  position: sticky;
  top: 86px;
}

.shop-panel h3 {
  color: var(--blue-deep);
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.cart-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  min-height: 130px;
}

.cart-row {
  gap: 12px;
  justify-content: space-between;
}

.cart-row small {
  color: var(--muted);
  display: block;
}

.empty-history {
  color: var(--muted);
  margin: 0;
}

.shop-message {
  color: var(--green);
  font-weight: 900;
  min-height: 24px;
}

.shop-message[data-error="true"] {
  color: var(--red);
}

.play-section {
  background:
    linear-gradient(90deg, rgba(247, 249, 251, 0.94), rgba(247, 249, 251, 0.66), rgba(247, 249, 251, 0.12)),
    url("assets/hero-campanella-sacred.png") center/cover;
  text-align: center;
}

.play-section p {
  margin-left: auto;
  margin-right: auto;
  max-width: 650px;
}

.play-actions {
  justify-content: center;
}

.copy-status {
  color: var(--green);
  font-weight: 1000;
  min-height: 24px;
}

.footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  padding: 24px clamp(20px, 6vw, 88px);
}

.footer p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 1100px) {
  .news-list,
  .region-grid,
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-layout,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .shop-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav {
    display: none;
  }

  .header-action {
    justify-self: end;
  }

  .world-feature,
  .mode-section,
  .race-panel {
    grid-template-columns: 1fr;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .news-list,
  .region-grid,
  .item-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 12px 16px;
  }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-actions,
  .play-actions,
  .shop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .button.secondary {
    justify-content: space-between;
  }

  .map-board {
    min-height: 420px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
