/* 黑客帝国: terminal green on black. Falling-code canvas in the hero; everything below is quiet panels with
   caption-box headings. (Layout inherited from the earlier build; palette and hero changed.) */
:root {
  --ink: #000;
  --night: #000a03;
  --night2: #04140a;
  --plum: #0b2a16;
  --pink: #00ff66;
  --pink2: #00b347;
  --aqua: #7dffb0;
  --aqua3: #c8ffdc;
  --orange: #ff3b3b;
  --yellow: #b6ff3b;
  --paper: #e9fff0;
  --mute: #9fd1af;
  --ok: #4dffb0;
  --bad: #ff8080;
  --edge: 4px;
  --gutter: 10px;
  --shadow: 6px 6px 0 var(--ink);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "SimHei", sans-serif;
  --num: "Bahnschrift", "DIN Condensed", "DIN Alternate", "Roboto Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--paper);
  font: 16px/1.65 var(--sans);
  padding: 0 16px env(safe-area-inset-bottom, 0px);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--night);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 255, 102, 0.035) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #001a08 0%, var(--night) 40%, #000 100%);
  background-size: 14px 14px, 100% 100%;
  background-attachment: fixed;
}
a { color: var(--aqua); text-underline-offset: 3px; }
code { font-family: var(--mono); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 10px 12px;
  background: var(--ink); border-bottom: 3px solid var(--pink); }
.brand { color: #eafff1; text-decoration: none; font: 900 20px/1 var(--display); letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--pink); transform: skewX(-8deg); display: inline-block; }
.bar nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.ghost { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 0;
  padding: 5px 12px; text-decoration: none; font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 3px 3px 0 var(--ink); display: inline-block; line-height: 1.5; }
.bar .ghost { border-color: var(--paper); box-shadow: none; background: var(--ink); color: var(--paper); }
.ghost:hover { background: var(--aqua3); }
.bar .ghost:hover { background: var(--night2); }
.ghost:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.neon-btn { width: 100%; border: var(--edge) solid var(--ink); border-radius: 0; padding: 14px 18px; font-weight: 900;
  font-size: 19px; letter-spacing: 0.04em; color: var(--ink); background: var(--pink); box-shadow: var(--shadow);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4); }
.neon-btn:hover { background: #ff57a0; }
.neon-btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.neon-btn.small { width: auto; padding: 5px 12px; font-size: 14px; border-width: 3px; box-shadow: none;
  background: var(--yellow); }
.neon-btn:disabled { background: #8c7a99; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }

main { max-width: 1180px; margin: 0 auto; }

/* ---------- hero: painted key art with the title and sale facts laid over it ---------- */
.hero { position: relative; margin: 16px 0 0; border: 3px solid var(--ink); background: var(--night); overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto auto; aspect-ratio: 1536 / 1024;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.hero-art { grid-area: 1 / 1 / 4 / 2; position: relative; }
.hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; }
.hero-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 10, 3, 0.55) 66%, rgba(0, 6, 2, 0.92) 100%); }
.hero-copy { grid-area: 2 / 1; position: relative; z-index: 1; text-align: center; padding: 0 16px 14px; }
.hero-deck { grid-area: 3 / 1; position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 12px 28px; padding: 14px 22px 16px; background: rgba(0, 6, 2, 0.86); border-top: 3px solid var(--pink); }

.kicker { margin: 0; display: inline-block; font-size: 15px; font-weight: 700; color: var(--paper); padding: 2px 12px;
  background: rgba(0, 6, 2, 0.72); border-left: 4px solid var(--pink); border-right: 4px solid var(--aqua); }
.title {
  margin: 6px 0 0; font: 900 clamp(60px, 12.4vw, 156px)/1.02 var(--display); letter-spacing: 0.03em;
  color: #eafff1; -webkit-text-stroke: 0.075em #000300; paint-order: stroke fill;
  text-shadow: 0 0.05em 0 #000300, 0.035em 0.09em 0 rgba(0, 179, 71, 0.95), 0 0.16em 0.4em rgba(0, 0, 0, 0.85), 0 0 0.6em rgba(0, 255, 102, 0.45);
  transform: skewX(-7deg);
}
.hook { margin: 6px auto 0; max-width: 34em; font-size: clamp(16px, 1.9vw, 21px); font-weight: 700; color: var(--paper);
  text-shadow: 0 2px 0 #000, 0 0 14px rgba(0, 0, 0, 0.9); }

/* countdown */
.clock { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.clock-label { font-size: 14px; font-weight: 700; color: var(--mute); max-width: 11em; line-height: 1.35; }
.clock-label strong { color: var(--paper); font-size: 17px; white-space: nowrap; }
.tz { font-weight: 900; color: var(--aqua); }
.digits { display: flex; gap: 6px; }
.digits div { text-align: center; min-width: 58px; background: #000; border: 2px solid rgba(255, 248, 239, 0.25); padding: 2px 6px 3px; }
.digits b { display: block; font: 700 clamp(30px, 3.4vw, 44px)/1 var(--num); font-stretch: 75%; color: var(--yellow);
  font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 212, 71, 0.45); }
.digits i { display: block; font-style: normal; color: var(--mute); font-size: 12px; line-height: 1.3; }
.clock-state { flex-basis: 100%; font-weight: 700; font-size: 14px; color: var(--ok); min-height: 1.4em; }

/* address */
.addr-card { min-width: 0; text-align: right; }
.addr-label { color: var(--yellow); font-weight: 900; font-size: 15px; }
.addr-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.addr-row code { font-size: 15px; word-break: break-all; color: var(--aqua3); }

@media (prefers-reduced-motion: no-preference) {
  .title { animation: stamp 0.5s .35s cubic-bezier(.3, 1.4, .5, 1) both; }
  @keyframes settle { from { transform: scale(1.06); filter: brightness(0.6); } to { transform: none; filter: none; } }
  @keyframes stamp { from { opacity: 0; transform: skewX(-7deg) scale(1.35); } to { opacity: 1; transform: skewX(-7deg) scale(1); } }
}

/* ---------- facts strip ---------- */
.facts { margin: 28px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--paper); color: var(--ink);
  border: var(--edge) solid var(--ink); box-shadow: var(--shadow); }
.stat { padding: 12px 14px; border-left: var(--edge) solid var(--ink); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 700 clamp(28px, 4.2vw, 44px)/1.05 var(--num); font-stretch: 75%; letter-spacing: 0.01em; }
.stat span { font-size: 14px; font-weight: 700; color: #4a2a5e; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.chips li { position: relative; padding-left: 26px; font-weight: 700; }
.chips li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 13px; height: 13px; background: var(--pink);
  border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--aqua); }

/* ---------- panels ---------- */
.spread { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 26px; align-items: start; }
.stack { display: grid; gap: 0; }
.panel { position: relative; background: var(--night2); border: var(--edge) solid var(--ink); box-shadow: var(--shadow);
  padding: 34px 18px 18px; margin: 40px 0 0; }
.panel h3 { margin: 16px 0 6px; font-size: 18px; color: var(--yellow); }
/* caption-box headings sit on the top border, like narration boxes */
.cap { position: absolute; left: 14px; top: -20px; margin: 0; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink);
  padding: 3px 12px; font-size: 18px; font-weight: 900; line-height: 1.4; box-shadow: 3px 3px 0 var(--ink);
  max-width: calc(100% - 28px); }
.panel-safe .cap { background: var(--aqua); }
.panel-share .cap { background: var(--pink); }
.panel-head { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 0; }
.panel-buy { padding-top: 30px; }
.live-dot { font-size: 13px; color: var(--ok); font-weight: 700; }
.live-dot::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--ok); margin-right: 6px; border: 2px solid var(--ink); }
.live-dot.stale { color: var(--mute); }
.live-dot.stale::before { background: var(--mute); }
.progress { margin-top: 8px; height: 22px; background: var(--night); overflow: hidden; border: 3px solid var(--ink); }
.fill { height: 100%; width: 0; background: var(--pink); border-right: 3px solid var(--ink);
  background-image: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(0, 0, 0, 0.22) 8px 14px); transition: width 0.6s; }
.prog-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; font: 700 18px/1.3 var(--num); }
.phase { color: var(--aqua); font: 700 15px/1.4 var(--sans); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 16px; margin-top: 10px; font-size: 14px; }
.kv div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px dotted rgba(255, 248, 239, 0.22); padding: 3px 0; }
.kv span { color: var(--mute); }
.kv b { font-family: var(--mono); font-weight: 600; text-align: right; word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .fill { transition: none; } html { scroll-behavior: auto; } }

.buybox { margin-top: 8px; }
.buybox label, .panel-share label { display: block; margin-top: 12px; color: var(--mute); font-size: 14px; font-weight: 700; }
.qty-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qty-row input { flex: 1 1 90px; min-width: 0; width: auto; }
input[type=number], input[type=text] { width: 100%; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 0;
  padding: 9px 12px; font: 16px var(--mono); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.15); }
input::placeholder { color: #7a6a86; }
input:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); }
.hint { font-size: 13px; color: var(--mute); margin: 4px 0 0; min-height: 1.2em; }
.hint.bad { color: var(--bad); }
.hint.good { color: var(--ok); }
.preview { margin: 12px 0; padding: 10px 12px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); font-size: 14px;
  box-shadow: 3px 3px 0 var(--aqua); }
.preview:empty { display: none; }
.preview .row { display: flex; justify-content: space-between; gap: 8px; }
.preview .row b { font-family: var(--mono); }
.msg { min-height: 1.4em; font-size: 14px; margin: 10px 0 0; word-break: break-word; }
.msg.bad { color: var(--bad); }
.msg.good { color: var(--ok); }
.side-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.me h3 { margin-top: 18px; }

.safety ul { margin: 0; padding-left: 0; list-style: none; }
.safety li { position: relative; padding-left: 26px; margin: 4px 0; }
.safety li::before { content: ""; position: absolute; left: 2px; top: 0.35em; width: 10px; height: 16px; border: solid var(--aqua);
  border-width: 0 4px 4px 0; transform: rotate(40deg); }
.verify { margin: 10px 0 0; font-size: 14px; color: var(--mute); }

.panel-share p { margin: 0; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 6px; }
.copy-row code { flex: 1; min-width: 0; background: var(--night); border: 3px solid var(--ink); padding: 8px 10px;
  font-size: 13px; overflow-wrap: anywhere; color: var(--aqua3); }

.panel-rules { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.duo { margin: 0; position: relative; min-height: 260px; border: 3px solid var(--ink); overflow: hidden; }
.duo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% 22%; display: block; }
.rules { margin: 0; padding: 0; list-style: none; counter-reset: r; columns: 2 20em; column-gap: 30px; }
.rules li { counter-increment: r; position: relative; padding-left: 38px; margin: 0 0 10px; break-inside: avoid; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 0.1em; width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); font: 700 16px/1 var(--num); }
.agents p { margin: 0; }
.agents .links { margin-top: 6px; font-family: var(--mono); }

footer { max-width: 1180px; margin: 44px auto 0; padding: 14px 0 36px; color: var(--mute); font-size: 13px; text-align: center;
  border-top: 3px solid var(--ink); }
footer code { word-break: break-all; }
.fine { font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30;
  background: var(--yellow); color: var(--ink); font-weight: 700; border: 3px solid var(--ink); padding: 8px 14px; box-shadow: 4px 4px 0 var(--ink); }
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(10, 2, 20, 0.75); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--night2); border: var(--edge) solid var(--ink); box-shadow: 8px 8px 0 var(--pink); padding: 18px; width: min(420px, 100%); }
.modal-card h3 { margin: 0 0 12px; color: var(--yellow); }
#walletList button { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 10px; }
#walletList img { width: 24px; height: 24px; }
.deep { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.deep .ghost { text-align: center; }

/* ---------- narrower screens ---------- */
@media (max-width: 980px) {
  .spread { grid-template-columns: minmax(0, 1fr); }
  .hero-deck { grid-template-columns: minmax(0, 1fr); }
  .addr-card { text-align: left; }
  .addr-row { justify-content: flex-start; }
}
@media (max-width: 760px) {
  :root { --gutter: 7px; --edge: 3px; }
  body { padding-left: 12px; padding-right: 12px; }
  .hero { margin-top: 12px; aspect-ratio: auto; grid-template-rows: 1fr auto auto; }
  .hero-art { grid-area: 1 / 1 / 3 / 2; }
  .hero-art img { position: static; height: auto; aspect-ratio: 672 / 1024; }
  .hero-art::after { background: linear-gradient(180deg, transparent 52%, rgba(12, 4, 22, 0.6) 72%, rgba(8, 2, 16, 0.95) 100%); }
  .title { font-size: clamp(56px, 20vw, 96px); }
  .kicker { font-size: 12px; }
  .hook { font-size: 15px; }
  .hero-deck { padding: 14px 12px 16px; }
  .clock { justify-content: center; text-align: center; }
  .clock-label { max-width: none; flex-basis: 100%; }
  .clock-label strong { display: inline; }
  .digits { justify-content: center; flex: 1 1 100%; }
  .digits div { flex: 1 1 0; min-width: 0; }
  .addr-card { text-align: center; }
  .addr-row { justify-content: center; }
  .addr-row code { font-size: 13px; }
  .panel-rules { grid-template-columns: minmax(0, 1fr); }
  .duo { min-height: 0; aspect-ratio: 3 / 2; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: var(--edge) solid var(--ink); }
  .chips { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 32px 14px 16px; }
  .bar { padding: 8px; margin: 0 -12px; }
  .bar .brand { font-size: 17px; }
  #xLink { display: none; }
  .cap { font-size: 16px; }
}
@media (max-width: 380px) {
  .bar nav { gap: 6px; }
  .bar .ghost, .neon-btn.small { padding: 4px 8px; }
}

/* ---------- 黑客帝国 additions ---------- */
.title { font-family: var(--mono), var(--display); letter-spacing: 0.06em; }
.hero-safe { list-style: none; margin: 12px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.hero-safe li { font: 700 14px/1.4 var(--mono), var(--sans); color: var(--pink); background: rgba(0, 0, 0, 0.78);
  border: 2px solid var(--pink); padding: 2px 10px; }
.hero-safe li::before { content: "✓ "; }
