:root {
  --ink: #0f1f2d;
  --muted: #4a6275;
  --line: rgba(15, 31, 45, 0.12);
  --bamboo: #2ecc71;
  --bamboo-dark: #1a9b52;
  --sky: #38bdf8;
  --violet: #7c3aed;
  --cream: #f4fbf7;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 31, 45, 0.12);
  --radius: 18px;
  --max: 1180px;
  --banner-ratio: 1024 / 500;
  --shot-ratio: 1280 / 800;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eefbf3 0%, #f8fffb 38%, #ffffff 100%);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--bamboo-dark);
  text-decoration: none;
}

a:hover {
  color: var(--violet);
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
}

.brand img {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a.is-active:not(.nav-store) {
  background: rgba(56, 189, 248, 0.15);
  color: #0369a1;
}

.site-nav a.nav-store {
  background: linear-gradient(135deg, #15803d, #0369a1);
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(21, 128, 61, 0.4);
  padding: 0.72rem 1.35rem !important;
  border: 2px solid #ffffff;
  font-size: 1rem !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.site-nav a.nav-store:hover,
.site-nav a.nav-store.is-active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #16a34a, #0284c7);
  filter: none;
}

body.page-store .site-nav a.nav-store {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45), 0 10px 26px rgba(3, 105, 161, 0.45);
}

.home-first-screen .btn-img img {
  width: min(200px, 38vw);
}

.home-banner-meta {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.banner-link {
  color: #ecfdf5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.banner-link:hover {
  color: #fff;
}

.page-home .section:first-of-type {
  padding-top: 1.5rem;
}

.store-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.btn-store-main,
.btn-store-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.btn-store-main {
  background: #fef08a;
  color: #14532d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.btn-store-main:hover {
  color: #14532d;
  filter: brightness(1.05);
}

.btn-store-alt {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn-store-alt:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.goods-loading {
  color: var(--muted);
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
}

.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding: 3rem 0;
}

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.home-banner {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  aspect-ratio: var(--banner-ratio);
  background: #0b1220;
}

.home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(180deg, transparent 35%, rgba(8, 20, 30, 0.82));
  color: #fff;
}

.home-banner-overlay h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.home-banner-overlay p {
  margin: 0 0 1.25rem;
  max-width: 52ch;
  opacity: 0.92;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn-img {
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-img img {
  width: min(220px, 42vw);
  height: auto;
}

.btn-img:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--bamboo), var(--sky));
  color: #fff;
  box-shadow: 0 12px 30px rgba(46, 204, 113, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 10px 30px rgba(15, 31, 45, 0.06);
}

.card h3 {
  margin-top: 0;
}

.shot-card {
  overflow: hidden;
  padding: 0;
}

.shot-card img {
  aspect-ratio: var(--shot-ratio);
  object-fit: cover;
  width: 100%;
}

.shot-card figcaption {
  padding: 1rem 1.1rem 1.2rem;
  color: var(--muted);
}

.split-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.about-page .icon-grid,
.game-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.icon-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(56, 189, 248, 0.2));
  flex-shrink: 0;
}

.icon-badge svg {
  width: 28px;
  height: 28px;
  stroke: var(--bamboo-dark);
}

.about-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.about-gallery img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 220px;
  object-fit: cover;
  width: 100%;
}

.about-story {
  columns: 2;
  column-gap: 2rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-cards a {
  font-weight: 600;
}

.store-banner {
  background: linear-gradient(120deg, #0f172a, #14532d 55%, #0369a1);
  color: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.store-banner .section-title,
.store-banner .section-lead {
  color: #ecfdf5;
}

.store-banner .section-lead {
  opacity: 0.9;
}

.coin-intro {
  margin-top: 2rem;
}

.goods-panel {
  margin-top: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1.25rem;
  max-height: 420px;
  overflow: auto;
}

.goods-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.goods-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.75rem;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.goods-item:hover,
.goods-item.is-selected {
  border-color: var(--bamboo);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.18);
  transform: translateY(-1px);
}

.goods-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.goods-item strong {
  display: block;
  font-size: 0.95rem;
}

.goods-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.checkout-panel {
  margin-top: 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid rgba(46, 204, 113, 0.35);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-field input,
.form-field select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.form-field input[readonly] {
  background: #f8fafc;
}

.form-field.has-error input,
.form-field.has-error select {
  border-color: #dc2626;
}

.field-error {
  color: #dc2626;
  font-size: 0.82rem;
  min-height: 1rem;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.payment-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  background: #fff;
  font-size: 0.9rem;
}

.payment-pill.is-active {
  border-color: var(--bamboo);
  background: rgba(46, 204, 113, 0.12);
}

.payment-pill.is-display-only {
  opacity: 0.55;
  cursor: not-allowed;
}

.currency-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.currency-switch button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.currency-switch button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.agree-field .agree-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.agree-field .agree-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.agree-field .agree-row label {
  flex: 1;
  margin: 0;
  line-height: 1.45;
  font-weight: 500;
}

.store-delivery {
  margin-top: 2rem;
  background: #f0fdf4;
  border: 1px dashed rgba(26, 155, 82, 0.35);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}

.store-delivery h3 {
  margin-top: 0;
}

.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.confirm-card,
.finish-card,
.error-card {
  max-width: 720px;
  margin: 3rem auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.page-about {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 45%);
}

.page-game {
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 50%);
}

.page-store {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 40%);
}

.page-contact {
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 45%);
}

.site-footer {
  margin-top: 3rem;
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-grid h3 {
  color: #fff;
  margin-top: 0;
}

.footer-grid a {
  color: #e2e8f0;
  display: block;
  margin: 0.35rem 0;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: #94a3b8;
}

@media (max-width: 960px) {
  .grid-3,
  .contact-cards,
  .footer-grid,
  .split-panel,
  .grid-2,
  .about-page .icon-grid,
  .game-page .feature-grid {
    grid-template-columns: 1fr;
  }

  .about-story {
    columns: 1;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}
