:root {
  color-scheme: dark;
  --bg: #071014;
  --panel: #0d1b20;
  --panel-soft: #11252b;
  --text: #effaf8;
  --muted: #7f9ca0;
  --line: rgba(151, 218, 217, 0.16);
  --accent: #56f0d6;
  --accent-2: #ffcf6a;
  --danger: #ff7b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(86, 240, 214, 0.14), transparent 34rem),
    linear-gradient(180deg, #071014 0%, #081317 42%, #061013 100%);
}

button {
  font: inherit;
}

.shell {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1;
  font-weight: 760;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(86, 240, 214, 0.1);
  color: var(--accent);
  position: relative;
}

.icon-button span,
.icon-button::before,
.icon-button::after {
  position: absolute;
  content: "";
  border: 1.5px solid currentColor;
}

.icon-button span {
  inset: 10px;
  border-left-color: transparent;
  border-radius: 50%;
}

.icon-button::before {
  width: 7px;
  height: 7px;
  border-left: 0;
  border-bottom: 0;
  right: 9px;
  top: 10px;
  transform: rotate(24deg);
}

.icon-button.loading span {
  animation: spin 0.8s linear infinite;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  align-items: end;
  padding: 28px 0 24px;
}

.hero::before {
  position: absolute;
  inset: 24px -60px -64px auto;
  width: 260px;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(86, 240, 214, 0.3) 22% 23%, transparent 23% 100%),
    repeating-linear-gradient(0deg, rgba(86, 240, 214, 0.18) 0 1px, transparent 1px 18px);
  transform: skewX(-18deg);
  opacity: 0.58;
}

.pulse {
  position: absolute;
  right: 22px;
  top: 34px;
  width: 82px;
  aspect-ratio: 1;
  border: 1px solid rgba(86, 240, 214, 0.28);
  border-radius: 50%;
}

.pulse::before,
.pulse::after {
  position: absolute;
  inset: 12px;
  content: "";
  border: 1px solid rgba(86, 240, 214, 0.2);
  border-radius: 50%;
  animation: breathe 2.8s ease-in-out infinite;
}

.pulse::after {
  inset: 28px;
  background: var(--accent);
  box-shadow: 0 0 28px rgba(86, 240, 214, 0.56);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy p {
  color: var(--muted);
  font-size: 13px;
}

.hero-copy h2 {
  margin-top: 8px;
  font-size: clamp(38px, 11vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.score-list {
  margin-top: 22px;
}

.list-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 0 4px 10px;
  color: var(--muted);
  font-size: 12px;
}

.recommendations {
  display: grid;
  gap: 10px;
}

.stock-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 14px 4px;
  border-top: 1px solid var(--line);
}

.rank {
  color: var(--accent);
  text-align: left;
}

.rank strong {
  display: block;
  color: var(--accent-2);
  font-size: 23px;
  line-height: 1;
  font-weight: 760;
}

.rank span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.stock-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.stock-title strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-title span {
  color: var(--muted);
  font-size: 12px;
}

.stock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stock-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.run-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.run-strip div {
  padding: 12px;
  background: rgba(13, 27, 32, 0.82);
}

.run-strip span,
.footnote {
  color: var(--muted);
  font-size: 11px;
}

.run-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.footnote {
  margin-top: 18px;
  text-align: center;
}

.empty-state,
.error-state {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.error-state {
  color: var(--danger);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    transform: scale(1.12);
    opacity: 0.46;
  }
}
