:root {
  color-scheme: dark;
  font-family: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --bg: #10120f;
  --surface: #181b15;
  --line: #30362a;
  --ink: #f5f6ee;
  --muted: #b2b8a9;
  --lime: #d3ff4f;
  --pink: #ff9bc4;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.wrap { width: min(calc(100% - 48px), 1120px); margin-inline: auto; }

.top { border-bottom: 1px solid var(--line); background: #11130f; }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; white-space: nowrap; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 8px;
  background: var(--lime);
  color: #192006;
  font-size: 23px;
}
nav { display: flex; align-items: center; gap: 26px; }
nav a { color: var(--muted); font-size: 13px; font-weight: 700; }
nav a:hover, .foot a:hover { color: var(--lime); }
nav a span { color: var(--lime); }

.hero {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 51%, #2e3c18 0%, transparent 44%),
    linear-gradient(111deg, #12150f, #191c13 74%, #161813);
}
.hero-grid { min-height: 521px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 34px; }
.hero-copy { z-index: 1; padding: 45px 0 52px; }
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 12px;
  border: 1px solid #4c6030;
  border-radius: 999px;
  color: var(--lime);
  background: #212a16;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.stamp span, .corner-bottom span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px #d3ff4f90;
}
h1 {
  margin: 0;
  font-size: clamp(78px, 9.5vw, 145px);
  font-weight: 900;
  letter-spacing: -.086em;
  line-height: .99;
}
h1 em { color: var(--lime); font-style: normal; }
h1 em span { color: var(--lime); }
.quote { margin: 24px 0; color: #d3d7c9; font-size: 15px; font-weight: 600; line-height: 1.85; }
.quote strong { color: var(--lime); }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: background .18s, border-color .18s, transform .18s;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.primary { color: #151c0a; background: var(--lime); }
.primary:hover { background: #e3ff95; }
.pink { color: #26141e; background: var(--pink); }
.pink:hover { background: #ffc3db; }
.outline { background: transparent; color: var(--ink); border-color: #53414b; }
.outline:hover { border-color: var(--pink); }

.arcade {
  position: relative;
  display: grid;
  place-items: center;
  height: 446px;
  isolation: isolate;
}
.arcade-grid {
  position: absolute;
  inset: 0 -24px;
  z-index: -1;
  background-image:
    linear-gradient(#bcf75413 1px, transparent 1px),
    linear-gradient(90deg, #bcf75413 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: radial-gradient(ellipse at center, #000 24%, transparent 74%);
}
.cabinet {
  position: relative;
  width: min(75%, 382px);
  aspect-ratio: 1;
  border: 1px solid #a6c475;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -7deg, #ffffff09 0deg 1deg, transparent 1deg 8deg),
    radial-gradient(circle, #141910 56%, #303d25 57%, #1c2318 73%);
  box-shadow: 0 16px 58px #000a, 0 0 48px #a8ff5031, inset 0 0 0 8px #11180eb0;
  container-type: inline-size;
}
.rim {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(from 18deg, #dcff64, #84ed61, #70e4b4, #daff4f, #ffd893, #ff9bc4, #d3ff4f);
  mask-image: radial-gradient(circle, transparent 64%, #000 64.4% 68%, transparent 68.4%);
}
.pad {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13%;
  height: 7%;
  border: 1px solid #bbd99e;
  border-radius: 5px;
  background: linear-gradient(#657950, #27331f);
  box-shadow: inset 0 2px 0 #ebffda60, 0 2px 8px #000a;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-42cqw);
}
.pad:nth-of-type(3n) { border-color: #ffe0ad; background: linear-gradient(#b69860, #54402b); }
.pad:nth-of-type(7) { border-color: #efb2d0; background: linear-gradient(#986383, #473243); }
.screen {
  position: absolute;
  inset: 15%;
  display: grid;
  place-items: center;
  border: 1px solid #61734a;
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, #d5ff4c07 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 44% 60%, #283619, #131a12 69%);
  box-shadow: inset 0 0 0 6px #141a12, inset 0 0 34px #080c07, 0 0 0 6px #090d08;
  text-align: center;
}
.screen-content { display: grid; justify-items: center; }
.screen span, .screen small, .arcade-corner {
  color: #d5e4bd;
  font: 600 10px/1.25 var(--mono);
  letter-spacing: .16em;
}
.screen b {
  margin: 1px 0 8px;
  color: var(--lime);
  font: 800 22cqw/.96 var(--display);
  letter-spacing: -.035em;
  text-shadow: 0 0 22px #c9ff4b55;
}
.screen small {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #5b7040;
  border-radius: 4px;
  background: #151d10;
}
.screen small i { width: 5px; height: 5px; background: var(--lime); border-radius: 50%; }
.arcade-corner { position: absolute; display: flex; align-items: center; gap: 7px; }
.arcade-corner b { color: var(--lime); }
.corner-top { left: 0; top: 24px; }
.corner-bottom { right: 0; bottom: 22px; }
.arcade-spark { position: absolute; color: var(--lime); line-height: 1; }
.spark-left { left: 6%; bottom: 18%; font-size: 28px; }
.spark-right { right: 8%; top: 16%; font-size: 25px; color: var(--pink); }

.ticker {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-block: 10px;
  background: var(--lime);
  color: #171e09;
  white-space: nowrap;
}
.ticker div { font: 800 15px/1.2 var(--display), "Noto Sans HK", sans-serif; letter-spacing: .1em; }
.ticker span { padding-inline: 16px; font-size: 11px; }

.tools { padding-block: 44px 48px; }
.hero-outage { margin: -9px 0 19px; color: #ffb5cf; font-size: 13px; font-weight: 800; }
.hero .corner-bottom span { background: var(--pink); box-shadow: 0 0 12px #ff9bc490; }
.outage {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px 24px;
  margin-bottom: 22px;
  padding: clamp(17px, 3.5vw, 34px);
  scroll-margin-top: 16px;
  border: 1px solid #794458;
  border-radius: 12px;
  background: radial-gradient(ellipse at 3% 0%, #4b2534, transparent 75%), #1e181e;
}
.outage h2 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 6vw, 63px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -.06em;
}
.outage p { margin: 0 0 13px; line-height: 1.65; }
.outage .outage-kicker { margin: 0; color: #ffb5cf; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.outage a { color: #ffbbd3; text-decoration: underline; text-underline-offset: 3px; }
.outage a:hover { color: #fff; }
.outage-story > a { font-size: 14px; font-weight: 800; }
.outage-console {
  align-self: center;
  padding: clamp(14px, 2.6vw, 25px);
  border: 1px solid #815064;
  border-radius: 9px;
  background: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 5px), #241820;
}
.outage-console strong {
  display: block;
  margin: 8px 0 4px;
  color: #ff98bd;
  font: 800 clamp(36px, 6vw, 67px)/1 var(--display);
  text-shadow: 0 0 20px #ff85b265;
}
.outage-console #sync-result { min-height: 2.8em; font-size: 14px; }
.outage-source { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #5a3545; font-size: 12px; color: #d6c1cb; }
.outage-source p { margin-bottom: 6px; }
.outage-source a { display: inline-block; margin: 4px 12px 0 0; }
@media (max-width: 650px) { .outage { grid-template-columns: 1fr; } }
.body-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  min-width: 0;
  scroll-margin-top: 16px;
  padding: 24px;
  border: 1px solid #394730;
  border-radius: 12px;
  background: linear-gradient(155deg, #21291a 0%, var(--surface) 55%);
}
.card.excuse {
  border-color: #4a3542;
  background: linear-gradient(155deg, #30232c 0%, #1c181c 56%);
}
.card-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #516733;
  border-radius: 8px;
  background: #26341a;
  color: var(--lime);
  font-size: 22px;
  font-weight: 800;
}
.excuse .card-icon { color: var(--pink); border-color: #714957; background: #4a2d40; font: 800 34px/1 var(--display); }
.card h2 { margin: 0; font-size: clamp(21px, 2.35vw, 30px); font-weight: 900; letter-spacing: -.035em; }
.card p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
form { margin-top: 19px; }
form label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.input-row, .quote-actions { display: flex; gap: 8px; }
input {
  width: 100%;
  min-width: 0;
  border: 1px solid #48543a;
  border-radius: 7px;
  padding: 10px 12px;
  background: #11150e;
  color: var(--ink);
  font-size: 16px;
}
input::placeholder { color: #9da693; }
.reading { position: relative; margin-top: 13px; }
progress { width: 100%; height: 10px; accent-color: var(--lime); }
.card #result { color: var(--lime); }
.reading.is-unlocked {
  isolation: isolate;
  overflow: hidden;
  padding: 10px 14px 14px;
  border: 1px solid #b6ed61;
  border-radius: 9px;
  background: radial-gradient(ellipse at 50% 70%, #5d3975, transparent 80%), #211c35;
  box-shadow: inset 0 0 26px #c6ff5030, 0 0 22px #c6ff5026;
  text-align: center;
}
.unlock {
  position: relative;
  z-index: 1;
  margin: 5px 0 0;
  color: #e3ff9b;
  font: 800 clamp(25px, 4vw, 47px)/1 var(--display);
  letter-spacing: .045em;
  text-shadow: 0 0 16px #a9ff6594;
}
.unlock span { color: #ffb3ed; }
.reading.is-unlocked #result { position: relative; z-index: 1; color: #f9efff; }
.unlock-burst { position: absolute; inset: 0; pointer-events: none; }
.unlock-burst i {
  position: absolute;
  top: 51%;
  left: 50%;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--confetti);
  animation: scatter-confetti 950ms cubic-bezier(.13,.55,.25,1) both;
}
.unlock-burst i:nth-child(3n) { border-radius: 50%; width: 8px; height: 8px; }
@keyframes scatter-confetti {
  0% { opacity: 1; transform: scale(.4); }
  35% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--spin)); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 45px)) rotate(calc(var(--spin) + 120deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .unlock-burst { display: none; }
}
blockquote {
  margin: 16px 0 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-inline-start: 2px solid var(--pink);
  background: #ffffff07;
  color: #ffdcf0;
  font-size: 14px;
  line-height: 1.8;
}
.copy-status { display: block; color: var(--pink); font-size: 12px; }
.copy-status:not(:empty) { margin-top: 7px; }

.stats-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.stats-link:hover { border-color: #9484cd; }
.rhythm-link { border-color: #65486a; background: linear-gradient(100deg, #2e1e35, var(--surface)); }
.rhythm-link .stats-icon { background: #542d57; color: #ffc4ef; }
.stats-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 7px; background: #332a48; color: #d8c7ff; }
.stats-link strong, .stats-link small { display: block; }
.stats-link small { margin-top: 3px; color: var(--muted); }
.stats-link b { margin-left: auto; color: #d8c7ff; }
.foot { display: flex; align-items: start; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-block: 19px 26px; }
.foot p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.foot span, .foot a { color: var(--muted); font-size: 12px; }
.foot a { white-space: nowrap; }

@media (max-width: 850px) {
  .hero-grid { gap: 12px; min-height: 450px; }
  .arcade { height: 360px; }
  .cabinet { width: 90%; }
  .wide-only { display: none; }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .nav { min-height: 0; flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  nav { gap: 15px; flex-wrap: wrap; }
  nav a { font-size: 12px; }
  .hero { background: radial-gradient(ellipse at 50% 76%, #2e3c18, #141710 58%); }
  .hero-grid { grid-template-columns: 1fr; gap: 6px; }
  .hero-copy { padding: 32px 0 0; }
  .stamp { margin-bottom: 16px; }
  h1 { font-size: clamp(62px, 14vw, 90px); }
  h1 br { display: none; }
  .quote { margin: 16px 0; }
  .arcade { height: auto; padding-block: 24px 27px; }
  .cabinet { width: min(68%, 295px); }
  .corner-top { top: 13px; }
  .corner-bottom { bottom: 14px; }
  .arcade-corner { font-size: 8px; }
  .screen span, .screen small { font-size: clamp(7px, 2vw, 10px); }
  .tools { padding-block: 25px 32px; }
  .body-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 18px; }
  .stats-link { margin-top: 14px; }
}

@media (max-width: 385px) {
  h1 { font-size: clamp(46px, 14vw, 58px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
