:root {
  --ink: #101418;
  --paper: #f5f1e8;
  --card: #fffaf0;
  --line: #1c2025;
  --accent: #e95f38;
  --green: #1f8a59;
  --muted: #68615a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--line);
  border-radius: 10px;
  box-shadow: 10px 10px 0 #d8c9a8;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 34px solid rgba(233, 95, 56, 0.42);
  border-radius: 50%;
}

.nav,
.hero-grid {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 18px;
  font-weight: 900;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  min-width: 88px;
  height: 38px;
  padding: 0 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-weight: 800;
}

.nav-ghost {
  height: 38px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  font-weight: 800;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: end;
  margin-top: 54px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  color: var(--ink);
  background: #ffd166;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary,
.secondary,
.more {
  height: 46px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 7px;
  font-weight: 900;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:disabled {
  cursor: default;
  opacity: 0.72;
  background: var(--green);
}

.secondary {
  color: var(--ink);
  background: #fff;
}

.hero-card {
  padding: 20px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
}

.stat strong {
  display: block;
  font-size: 46px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.member-state {
  margin-top: 18px;
  padding: 10px 12px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-weight: 900;
  text-align: center;
}

.member-state.on {
  background: var(--green);
}

main {
  margin-top: 34px;
}

.announcement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 10px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 #d8c9a8;
}

.announcement-hint {
  grid-column: 1 / -1;
  padding: 12px 14px;
  color: #7b351e;
  background: #fff4ed;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.announcement-label {
  padding: 5px 8px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.announcement-track {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.announcement-text {
  display: inline-flex;
  gap: 72px;
  width: max-content;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  transform: translate3d(0, 0, 0);
  animation: marquee var(--marquee-duration, 28s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  contain: content;
}

.announcement-text span {
  flex: 0 0 auto;
}

.announcement-contact {
  height: 32px;
  padding: 0 10px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.announcement-note {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: #5f534a;
  background: #fff8ec;
  border: 2px dashed rgba(28, 32, 37, 0.24);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-1 * var(--marquee-distance, 50%)), 0, 0);
  }
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: center;
  scroll-margin-top: 12px;
}

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

.category {
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
}

.category.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.search input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  border: 0;
  outline: 0;
  background: transparent;
}

.notice {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(520px, calc(100% - 32px));
  margin: 0;
  padding: 14px 16px;
  background: #fff4ed;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: #7b351e;
  font-weight: 800;
  box-shadow: 6px 6px 0 rgba(28, 32, 37, 0.16);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notice.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.game-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  min-height: 124px;
  padding: 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--line);
}

.game-cover {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: #ddd;
}

.game-title {
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.game-badges span {
  padding: 3px 7px;
  color: #12623f;
  background: #e5f8e9;
  border: 1px solid rgba(31, 138, 89, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.game-meta,
.game-tip {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.trial {
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.play {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.more {
  display: block;
  margin: 28px auto 0;
  color: #fff;
  background: var(--ink);
}

.dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 10px;
}

.dialog::backdrop {
  background: rgba(16, 20, 24, 0.62);
}

.dialog-card {
  padding: 24px;
  border: 2px solid var(--line);
}

.dialog-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.dialog-card p {
  color: var(--muted);
}

.dialog-card label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  font-weight: 900;
}

.dialog-card input {
  height: 44px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 7px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.order-info {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.order-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  background: #fff8ec;
  border: 2px solid rgba(28, 32, 37, 0.12);
  border-radius: 7px;
}

.order-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.order-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.order-info p {
  color: var(--muted);
  font-size: 14px;
}

.order-info .error-text {
  color: #b42318;
  font-weight: 900;
}

@media (max-width: 780px) {
  .shell {
    width: min(100% - 24px, 520px);
    padding-top: 12px;
  }

  .hero {
    padding: 18px;
  }

  .hero-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    margin-inline: -12px;
    padding: 10px 12px;
    background: rgba(245, 241, 232, 0.96);
  }

  .hero-grid {
    margin-top: 42px;
  }

  .hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .announcement {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .announcement-contact {
    grid-column: 1 / -1;
    width: 100%;
  }

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

}
