:root {
  --ink: #18202a;
  --paper: #fff7df;
  --paper-soft: #fffdf2;
  --sky: #8fd8ff;
  --grass: #4fb06f;
  --leaf: #b9e66b;
  --coral: #ff6f61;
  --sun: #ffd166;
  --violet: #7c6ee6;
  --blue: #2f7de1;
  --shadow: #4a3c31;
  --line: 3px solid var(--ink);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 32, 42, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fff2b8 0, var(--paper) 44%, #e8ffd6 100%);
  background-size: 18px 18px, 18px 18px, auto;
  font-family: "Courier New", "Microsoft YaHei", monospace;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

input[type="range"] {
  height: 18px;
  padding: 0;
  border: var(--line);
  background:
    linear-gradient(90deg, var(--coral) 0, var(--sun) 45%, var(--grass) var(--energy, 62%), rgba(255, 255, 255, 0.7) var(--energy, 62%));
  accent-color: var(--grass);
}

select,
input,
textarea {
  width: 100%;
  border: var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(
    180deg,
    rgba(24, 32, 42, 0.025) 0,
    rgba(24, 32, 42, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: multiply;
}

.site-header,
.site-footer,
main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  background: rgba(255, 247, 223, 0.9);
  backdrop-filter: blur(10px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
  color: #fff;
  text-shadow:
    2px 0 0 #000,
    -2px 0 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    3px 3px 0 #000;
}

.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--grass);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--sun), 10px 0 0 var(--coral);
}

.nav-links {
  gap: 6px;
  font-size: 14px;
}

.nav-links a {
  padding: 6px 10px;
  border: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--ink);
  background: var(--sun);
  outline: none;
}

.hero-section {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: 34px 0 42px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.08;
  letter-spacing: 0;
  color: #fff;
  text-shadow:
    3px 0 0 #000,
    -3px 0 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    6px 6px 0 #000;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.18;
}

.hero-lead {
  max-width: 660px;
  margin-bottom: 26px;
  font-size: clamp(17px, 2vw, 22px);
}

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

.button,
.icon-button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  min-height: 48px;
  gap: 9px;
  padding: 10px 16px;
  box-shadow: 5px 5px 0 var(--shadow);
}

.button svg,
.icon-button svg,
.tab-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.5;
}

.primary {
  background: var(--grass);
  color: #fffdf4;
}

.secondary {
  background: var(--paper-soft);
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.tab-button:hover,
.tab-button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
  outline: none;
}

.quest-line {
  display: inline-block;
  max-width: 650px;
  margin: 22px 0 0;
  padding: 10px 12px;
  border: 2px dashed var(--ink);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 900;
}

.hero-art {
  position: relative;
  margin: 0;
  border: var(--line);
  background: var(--sky);
  box-shadow: 10px 10px 0 var(--ink);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  image-rendering: pixelated;
  transition: opacity 260ms ease, transform 260ms ease;
}

.hero-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
}

.hero-art:hover .hero-img-default,
.hero-art:focus-within .hero-img-default {
  opacity: 0;
  transform: scale(1.025);
}

.hero-art:hover .hero-img-hover,
.hero-art:focus-within .hero-img-hover {
  opacity: 1;
  transform: scale(1);
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: var(--line);
  margin-bottom: 70px;
  background: rgba(255, 253, 242, 0.62);
}

.intro-strip span {
  min-height: 68px;
  display: grid;
  place-items: center;
  padding: 12px;
  font-weight: 900;
  text-align: center;
}

.intro-strip span:nth-child(1) {
  background: rgba(143, 216, 255, 0.45);
}

.intro-strip span:nth-child(2) {
  background: rgba(255, 209, 102, 0.42);
}

.intro-strip span:nth-child(3) {
  background: rgba(185, 230, 107, 0.42);
}

.intro-strip span:nth-child(4) {
  background: rgba(255, 111, 97, 0.22);
}

.intro-strip span + span {
  border-left: var(--line);
}

.content-grid,
.community-section,
.opc-section,
.ai-section,
.predict-section,
.board-section,
.wechat-section {
  margin-bottom: 76px;
}

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

.pixel-panel,
.mini-card,
.channel-panel,
.qr-panel,
.account-panel,
.ai-lab,
.predict-form,
.predict-result,
.message-form,
.message-wall,
.message-card {
  border: var(--line);
  background: rgba(255, 253, 242, 0.9);
  box-shadow: 7px 7px 0 var(--shadow);
}

.pixel-panel {
  padding: clamp(22px, 4vw, 36px);
}

.pixel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pixel-list li {
  position: relative;
  padding-left: 24px;
  margin-top: 12px;
}

.pixel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  background: var(--coral);
  border: 2px solid var(--ink);
  transform: translateY(-50%);
}

.section-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-head p:last-child {
  margin-bottom: 0;
  font-size: 18px;
}

.opc-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 22px;
  align-items: end;
}

.opc-section .section-head {
  margin-bottom: 0;
}

.channel-tabs {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tab-button {
  min-height: 48px;
  gap: 8px;
  padding: 9px 12px;
  background: var(--paper-soft);
  box-shadow: 4px 4px 0 var(--shadow);
  font-weight: 900;
}

.tab-button.is-active {
  background: var(--sun);
}

.channel-panel {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  padding: 24px;
  background: linear-gradient(135deg, #fffdf2 0, #e8ffd6 100%);
}

.channel-panel h3,
.channel-panel p {
  grid-column: 2;
}

.channel-panel p {
  margin-bottom: 0;
}

.predict-grid,
.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.predict-form,
.message-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 30px);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.predict-result {
  position: sticky;
  top: 110px;
  padding: clamp(20px, 4vw, 30px);
  background: linear-gradient(135deg, #fffdf2 0, #dff5ff 48%, #fff0bd 100%);
}

.score-orb {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  margin-bottom: 18px;
  border: var(--line);
  background: var(--sun);
  box-shadow: 6px 6px 0 var(--ink);
}

.score-orb span {
  font-size: 46px;
  line-height: 1;
  font-weight: 900;
}

.score-orb small {
  font-weight: 900;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.metric-list span {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.68);
  font-weight: 900;
}

.result-advice {
  margin-top: 12px;
}

.ai-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: 22px;
  align-items: stretch;
}

.ai-section .section-head {
  margin-bottom: 0;
}

.ai-lab {
  padding: clamp(20px, 4vw, 30px);
  background: linear-gradient(135deg, #e9f7ff 0, #fffdf2 55%, #fff0bd 100%);
  display: grid;
  gap: 16px;
}

.mood-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-weight: 900;
}

.mood-control input {
  width: 100%;
  accent-color: var(--coral);
}

.prompt-box {
  min-height: 112px;
  padding: 16px;
  border: var(--line);
  background: var(--paper-soft);
  font-size: 18px;
  font-weight: 900;
}

.checklist {
  display: grid;
  gap: 8px;
}

.checklist span {
  padding: 10px 12px;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.community-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: start;
}

.community-stack {
  display: grid;
  gap: 16px;
}

.mini-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  padding: 22px;
}

.mini-card:nth-child(1) {
  background: #f0fbff;
}

.mini-card:nth-child(2) {
  background: #fff5cf;
}

.mini-card:nth-child(3) {
  background: #efffde;
}

.mini-card h3,
.mini-card p {
  grid-column: 2;
}

.mini-card p {
  margin-bottom: 0;
}

.pixel-number {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: var(--sun);
  border: var(--line);
  font-weight: 900;
}

.message-wall {
  padding: clamp(18px, 3vw, 24px);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-chip {
  border: 2px solid var(--ink);
  background: var(--paper-soft);
  color: var(--ink);
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
}

.filter-chip.is-active,
.filter-chip:hover,
.filter-chip:focus-visible {
  background: var(--sun);
  outline: none;
}

.message-list {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding-right: 6px;
}

.message-card {
  padding: 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.message-card p {
  margin-bottom: 10px;
}

.message-card small {
  font-weight: 900;
  color: rgba(24, 32, 42, 0.72);
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.message-meta span {
  padding: 4px 7px;
  border: 2px solid var(--ink);
  background: rgba(143, 216, 255, 0.45);
  font-size: 13px;
  font-weight: 900;
}

.wechat-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: stretch;
  padding: clamp(24px, 5vw, 42px);
  border: var(--line);
  background:
    linear-gradient(135deg, rgba(47, 125, 225, 0.92), rgba(79, 176, 111, 0.92)),
    var(--blue);
  color: #fffdf4;
  box-shadow: 10px 10px 0 var(--coral);
}

.wechat-copy p {
  max-width: 640px;
}

.wechat-id {
  display: inline-grid;
  grid-template-columns: auto minmax(0, auto) 44px;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 3px solid #fffdf4;
  background: #fffdf4;
  color: var(--ink);
}

.compact-id {
  margin-left: 0;
}

.guest-share {
  margin-top: 22px;
  max-width: 680px;
  padding: 18px;
  border: 3px solid #fffdf4;
  background: rgba(255, 253, 244, 0.14);
}

.guest-share h3 {
  margin-bottom: 8px;
}

.guest-share p {
  margin-bottom: 10px;
}

.guest-share ol {
  margin: 0;
  padding-left: 22px;
}

.guest-share li {
  margin-top: 8px;
  font-weight: 900;
}

.wechat-id strong {
  overflow-wrap: anywhere;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--shadow);
}

.qr-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px;
  background: #fffdf4;
  color: var(--ink);
  text-align: center;
}

.account-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 22px;
  background: #fffdf4;
  color: var(--ink);
  text-align: center;
}

.account-panel svg {
  width: 52px;
  height: 52px;
  padding: 8px;
  border: var(--line);
  background: var(--sun);
  box-shadow: 4px 4px 0 var(--shadow);
}

.account-panel h3 {
  margin-bottom: 0;
}

.account-panel p {
  margin-bottom: 0;
  font-weight: 900;
}

.qr-panel p {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.qr-placeholder {
  width: 178px;
  height: 178px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
  border: var(--line);
  background: var(--paper);
}

.qr-placeholder span {
  background: var(--ink);
}

.qr-placeholder span:nth-child(2),
.qr-placeholder span:nth-child(5),
.qr-placeholder span:nth-child(8),
.qr-placeholder span:nth-child(10),
.qr-placeholder span:nth-child(15) {
  background: var(--grass);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 0.8fr;
  gap: 22px;
  padding: 30px 0 38px;
  border-top: var(--line);
  font-size: 14px;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.site-footer p {
  margin-bottom: 6px;
}

.site-footer a {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 14px;
  border: var(--line);
  background: var(--sun);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  overflow-wrap: anywhere;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-section,
  .content-grid,
  .community-section,
  .opc-section,
  .ai-section,
  .predict-grid,
  .board-layout,
  .wechat-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-art {
    box-shadow: 7px 7px 0 var(--ink);
  }

  .opc-section .section-head,
  .ai-section .section-head,
  .channel-tabs,
  .channel-panel {
    grid-column: 1;
  }

  .predict-result {
    position: static;
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-panel,
  .account-panel {
    justify-self: start;
    width: min(100%, 260px);
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 22px, var(--max));
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .button {
    width: 100%;
  }

  .intro-strip,
  .channel-tabs,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-strip span:nth-child(3) {
    border-left: 0;
    border-top: var(--line);
  }

  .intro-strip span:nth-child(4) {
    border-top: var(--line);
  }

  .channel-panel,
  .mini-card {
    grid-template-columns: 1fr;
  }

  .channel-panel h3,
  .channel-panel p,
  .mini-card h3,
  .mini-card p {
    grid-column: 1;
  }

  .pixel-number {
    grid-row: auto;
  }

  .mood-control {
    grid-template-columns: 1fr;
  }

  .metric-list,
  .field-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .wechat-id {
    grid-template-columns: 1fr 44px;
  }

  .wechat-id span {
    grid-column: 1 / -1;
  }
}
