:root {
  --ink: #1f252c;
  --muted: #697386;
  --line: #dfe4ea;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --accent: #1f6f5f;
  --blue: #285f9f;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Serif SC", serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  cursor: pointer;
}
main {
  width: min(1480px, calc(100vw - 40px));
  margin: 0 auto 72px;
}
.entry-screen {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}
.project-entry {
  width: min(760px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(180px, 1fr));
  gap: 18px;
  justify-content: center;
}
.project-tile {
  min-height: 132px;
  display: grid;
  place-items: center;
  border: 1px solid #cad1db;
  background: #fff;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 14px 34px rgba(24, 34, 48, .08);
}
.project-tile:hover { border-color: var(--accent); color: var(--accent); }
.topnav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 18px 0;
  background: rgba(247, 246, 241, .92);
  backdrop-filter: blur(12px);
}
.brand {
  font-size: 24px;
  font-weight: 900;
}
.topnav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.topnav a,
.topnav button {
  border-color: #c8d0da;
  background: #fff;
  padding: 10px 14px;
}
.market-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 20px 0 22px;
}
.market-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}
.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.project-tabs button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 26px;
}
.product-card {
  display: block;
  background: var(--panel);
  border: 1px solid #e4e7ec;
  min-height: 324px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(30, 40, 54, .11);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #101820;
  padding: 0;
}
.product-card strong {
  display: block;
  padding: 15px 14px 3px;
  font-size: 21px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card span {
  display: block;
  min-height: 28px;
  padding: 0 14px 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card em {
  display: block;
  border-top: 1px solid #e4e7ec;
  color: var(--blue);
  font-size: 22px;
  font-style: normal;
  font-weight: 800;
  padding: 14px 12px 4px;
  text-align: center;
}
.official-price {
  display: block;
  color: var(--muted);
  font-size: 12px;
  padding: 0 12px 14px;
  text-align: center;
}
.product-page {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 28px;
  padding-top: 12px;
}
.detail-side {
  border-right: 1px solid var(--line);
  padding-right: 24px;
}
.detail-side img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 6px;
  background: #101820;
  min-height: 360px;
}
.detail-price {
  margin-top: 18px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}
.detail-price small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.version-line {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 12px;
}
.buy {
  display: block;
  width: 100%;
  margin: 16px 0 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}
.ghost {
  display: block;
  width: 100%;
  border: 1px solid #98abc0;
  background: #fff;
  padding: 12px;
  text-align: center;
}
.detail-main h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}
.crumb, .subtitle, .muted { color: var(--muted); }
.rating-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.rating-strip strong {
  color: #d89b00;
  font-size: 28px;
}
.rating-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.rating-labels span {
  border: 1px solid #e3d19b;
  background: #fff9e6;
  color: #7a5700;
  padding: 7px 10px;
  font-size: 14px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  padding: 6px 0 18px;
  margin-bottom: 12px;
}
.gallery-full {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}
.overview h2,
.reviews h2 {
  margin: 24px 0 12px;
}
.copy {
  margin: 24px 0;
  font-size: 18px;
  line-height: 1.9;
}
.notice {
  border: 1px dashed #b9c3cf;
  background: #fff;
  padding: 16px;
  font-weight: 800;
}
.delivery-note {
  margin: 16px 0 22px;
  background: #eceff2;
  padding: 16px;
  line-height: 1.8;
}
.review {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.review img,
.avatar {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e3e8ee;
  color: var(--ink);
  font-weight: 800;
  font-size: 26px;
}
.review-avatar {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.review-avatar small {
  color: var(--muted);
}
.review-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
}
.review-head strong {
  color: #3268ad;
}
.review p {
  margin: 6px 0 0;
  line-height: 1.7;
}
.comment-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  margin-bottom: 12px;
}
.comment-form textarea {
  min-height: 48px;
  resize: vertical;
}
.comment-form p {
  grid-column: 1 / -1;
  margin: 0;
}
.review-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.review-images img {
  width: min(520px, 100%);
  height: 96px;
  border-radius: 0;
  object-fit: cover;
  border: 1px solid var(--line);
}
.review-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.review-files a {
  color: #2f5faf;
  text-decoration: underline;
  font-weight: 700;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
}
.redeem-panel {
  max-width: 680px;
  margin: 40px auto;
}
.form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.redeem-inline {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: #f9fafb;
  padding: 12px;
}
.redeem-inline[hidden] {
  display: none;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}
.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.download-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #f9fafb;
  padding: 16px;
}
.account-tools {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.my-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 36px 0;
}
.watch-head {
  margin: 20px 0 18px;
}
.watch-head h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}
.watch-list {
  display: grid;
  gap: 16px;
}
.watch-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}
.watch-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.watch-card-head strong {
  display: block;
  font-size: 22px;
}
.watch-card-head span {
  color: var(--muted);
  font-size: 13px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.account-grid div,
.strategy-watch {
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 12px;
}
.account-grid span,
.strategy-watch span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.account-grid b {
  font-weight: 800;
}
.watch-note {
  color: var(--muted);
  margin: 0 0 14px;
}
.strategy-watch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.strategy-watch p {
  margin: 0;
  line-height: 1.7;
}
.strategy-watch img {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.strategy-watch.locked {
  opacity: .88;
}
.exchange-list,
.entitlement-list {
  display: grid;
  gap: 10px;
}
.exchange-card {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  font-weight: 800;
}
.benefit-hero {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
  margin-bottom: 16px;
}
.benefit-hero h2 {
  margin: 0;
  font-size: 24px;
}
.rich-copy {
  line-height: 1.75;
  margin: 8px 0;
}
.rich-copy p {
  margin: 0 0 10px;
}
.rich-copy a,
.exchange-card a {
  color: #2f5faf;
  text-decoration: underline;
  font-weight: 800;
}
.benefit-code,
.benefit-note {
  border: 1px solid #d8e2da;
  background: #f3f8f4;
  padding: 12px 14px;
}
.error { color: var(--danger); font-weight: 800; }
.ok { color: var(--accent); font-weight: 800; }
.empty { color: var(--muted); }

@media (max-width: 840px) {
  main { width: min(100% - 24px, 1480px); }
  .project-entry { grid-template-columns: 1fr; }
  .market-head, .product-page { display: block; }
  .project-tabs { justify-content: flex-start; margin-top: 14px; }
  .detail-side { border-right: 0; padding-right: 0; margin-bottom: 24px; }
  .topnav { display: block; }
  .topnav nav { margin-top: 12px; overflow-x: auto; }
  .gallery { grid-template-columns: 1fr; }
  .comment-form { grid-template-columns: 1fr; }
  .my-page, .account-grid, .strategy-watch-grid { grid-template-columns: 1fr; }
}
