:root {
  --wood: #7a4f32;
  --wood-dark: #4e3220;
  --cream: #fff9f2;
  --peach: #ffb4a2;
  --mint: #5ecfc3;
  --berry: #c77dff;
  --ink: #2a1f1a;
  --muted: #6b5b52;
  --line: rgba(42, 31, 26, 0.12);
  --shadow: 0 18px 50px rgba(78, 50, 32, 0.12);
  --radius: 18px;
  --shop: linear-gradient(135deg, #ff8a5c, #ff5e62);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff4ea 0%, var(--cream) 45%, #f6ebe3 100%);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--wood-dark);
  text-decoration: none;
}

a:hover {
  color: var(--berry);
}

.wrap {
  width: 100%;
  margin-inline: auto;
}

.site-frame {
  width: 1200px;
  max-width: calc(100% - 1.5rem);
  margin: 1rem auto 2rem;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  align-items: start;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.site-sidebar {
  position: sticky;
  top: 0.75rem;
  align-self: start;
  min-height: calc(100vh - 1.5rem);
  padding: 1.25rem 1rem 1.5rem;
  background: linear-gradient(180deg, #fff9f2 0%, #f3e4d8 100%);
  border-right: 1px solid var(--line);
}

.site-body {
  min-width: 0;
  background: rgba(255, 249, 242, 0.65);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.brand-logo {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 166;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--wood-dark);
  line-height: 1.35;
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.site-nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a.is-active {
  background: rgba(122, 79, 50, 0.1);
}

.site-nav a.nav-shop {
  background: var(--shop);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 94, 98, 0.35);
  text-align: center;
}

.site-nav a.nav-shop:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.site-nav a.nav-shop.is-active {
  background: linear-gradient(135deg, #ff5e62, #ff2d55);
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 94, 98, 0.35), 0 14px 30px rgba(255, 45, 85, 0.45);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.page-shop .site-nav a.nav-shop {
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

.nav-shop {
  background: var(--shop);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 94, 98, 0.35);
}

.nav-shop:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--wood) linear-gradient(#fff0, #fff0),
    linear-gradient(var(--ink), var(--ink)) center/22px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center/22px 2px no-repeat;
  background-size: 100% 100%, 22px 2px, 22px 2px;
  background-position: center, center 16px, center 26px;
}

.site-main {
  min-height: 60vh;
  padding: 0 1.25rem;
}

.masthead {
  padding: 2.5rem 0 1rem;
}

.masthead-banner {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1024 / 500;
  background: #edd5c4;
}

.masthead-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-first {
  padding: 0.85rem 0 1rem;
}

.home-first-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: center;
}

.home-first-banner {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1024 / 500;
  max-height: min(42vh, 320px);
  background: #edd5c4;
}

.home-first-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-first-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.home-first-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.home-first-tag {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-first-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.2;
  color: var(--wood-dark);
}

.home-first-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.35rem;
}

.store-btn-sm {
  width: 132px;
  max-width: 46%;
}

.home-section-tight {
  padding: 1.75rem 0;
}

.section-lead-tight {
  margin-bottom: 1rem;
}

.home-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.home-pillar {
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(78, 50, 32, 0.06);
}

.home-pillar h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--wood-dark);
}

.home-pillar p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.home-shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.home-shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-shot img {
  width: 100%;
  aspect-ratio: 800 / 1280;
  object-fit: cover;
}

.home-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.35rem;
  border-radius: calc(var(--radius) + 4px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.home-bottom-bar .section-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.home-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  flex-shrink: 0;
}

.home-bottom-actions .nav-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  min-height: 45px;
  box-sizing: border-box;
}

.home-bottom-actions .store-btn-sm {
  max-width: none;
  width: 132px;
  height: 45px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.home-bottom-actions .store-btn-sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.section {
  padding: 3rem 0;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 0.5rem;
  color: var(--wood-dark);
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.store-btn {
  display: inline-block;
  width: min(280px, 100%);
  aspect-ratio: 499 / 171;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.store-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-btn:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.15));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.feature-card {
  grid-column: span 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 800 / 1280;
  object-fit: cover;
}

.feature-card figcaption {
  padding: 0.85rem 1rem 1rem;
  font-weight: 600;
}

.split-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.game-mark {
  width: min(280px, 70%);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.icon-list {
  display: grid;
  gap: 1rem;
}

.icon-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--mint), var(--berry));
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.about-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-gallery img {
  border-radius: var(--radius);
  aspect-ratio: 800 / 1280;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow);
}

.page-about .about-gallery img {
  max-height: 320px;
  aspect-ratio: 4 / 5;
}

.timeline-card,
.contact-card,
.confirm-card,
.status-card {
  background: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.shop-banner {
  background: linear-gradient(120deg, #4e3220, #7a4f32 40%, #ff8a5c);
  color: #fff;
  border-radius: calc(var(--radius) + 8px);
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.shop-banner .nav-shop {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
}

.coins-intro {
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.5rem;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.goods-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow);
}

.goods-thumb {
  width: 74px;
  height: 72px;
  object-fit: contain;
}

.goods-title {
  font-weight: 700;
  margin: 0;
}

.goods-price {
  font-size: 1.25rem;
  color: var(--wood-dark);
  font-weight: 800;
}

.goods-buy {
  margin-top: auto;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--shop);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.shop-promise {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff7ef;
  border-left: 5px solid var(--mint);
}

.shop-promise h3 {
  margin-top: 0;
}

.checkout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
}

.checkout-backdrop.is-open {
  display: flex;
}

.checkout-panel {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem;
}

.checkout-package {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fff9f2;
  border: 1px solid var(--line);
}

.checkout-package-icon {
  width: 48px;
  height: auto;
  flex-shrink: 0;
}

.checkout-package-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkout-package-title {
  margin: 0.15rem 0 0;
  font-weight: 700;
  color: var(--wood-dark);
  line-height: 1.35;
}

.checkout-package-price {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--wood-dark);
}

.checkout-panel label {
  display: block;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}

.checkout-panel input,
.checkout-panel select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}

.payment-options {
  display: grid;
  gap: 0.5rem;
}

.payment-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.payment-options input {
  width: auto;
}

.currency-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 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(--wood-dark);
  color: #fff;
  border-color: var(--wood-dark);
}

.checkout-submit {
  width: 100%;
  margin-top: 1rem;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem;
  background: var(--shop);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.form-error {
  color: #b42318;
  font-size: 0.9rem;
  min-height: 0;
  margin-top: 0.75rem;
}

.form-error:not(:empty) {
  background: #fff1f0;
  border: 1px solid #ffb4b4;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
}

.checkout-panel input.field-invalid {
  border-color: #e5484d;
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.15);
}

.checkout-panel .payment-options.field-invalid {
  border: 1px solid #e5484d;
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.12);
}

.shop-alert {
  background: #fff1f0;
  border: 1px solid #ffb4b4;
  color: #8a1f1f;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: none;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.45;
}

.shop-alert::before {
  content: "!";
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #e5484d;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

.shop-alert.is-visible {
  display: block;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  text-align: left;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.status-success {
  color: #067647;
}

.status-fail {
  color: #b42318;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.5rem;
}

.status-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.05rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--wood-dark);
}

.status-btn:hover {
  color: var(--berry);
}

.status-btn-primary {
  background: var(--shop);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255, 94, 98, 0.3);
}

.status-btn-primary:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.site-footer {
  margin-top: 0;
  padding: 2rem 1.25rem 1.25rem;
  background: #2a1f1a;
  color: #f7ede4;
}

.site-footer a {
  color: #ffd8bf;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  width: min(240px, 100%);
  aspect-ratio: 1024 / 166;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.footer-links a,
.footer-legal a {
  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: rgba(255, 255, 255, 0.72);
}

@media (max-width: 960px) {
  .feature-card {
    grid-column: span 6;
  }

  .split-panel,
  .footer-grid,
  .contact-grid,
  .home-first-grid,
  .home-pillars,
  .home-shot-grid {
    grid-template-columns: 1fr;
  }

  .home-first-banner {
    max-height: 200px;
  }

  .home-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-bottom-actions {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .site-frame {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: relative;
    top: 0;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .feature-card {
    grid-column: span 12;
  }

  .about-gallery {
    grid-template-columns: 1fr;
  }
}
