:root {
  --orange: #f96302;
  --bg: #090b0e;
  --card: #15191e;
  --text: #f7f8fa;
  --muted: #aab1bb;
  --green: #27d17f;
  --yellow: #ffd047;
  --red: #ff5b5b;
  --line: #2b3139;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
main { max-width: 540px; margin: auto; padding: 16px 14px 96px; }

.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 46px; height: 46px; background: var(--orange);
  border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; font-weight: 1000; flex: none;
}
.sub { color: var(--muted); font-size: 13px; }
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: 31px; line-height: 1.05; margin: 0 0 8px; }
.hero strong { color: #ffb37e; }

.btn {
  width: 100%; border: 0; border-radius: 18px; padding: 19px;
  font-weight: 900; font-size: 20px; margin: 7px 0; cursor: pointer;
  color: #fff;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; }
.primary { background: var(--orange); box-shadow: 0 8px 30px #f9630244; }
.secondary { background: #242a31; }
.hunt { background: #173f2a; color: #caffdf; border: 1px solid #2b8152; }
.small { padding: 13px; font-size: 15px; }
.linklike {
  background: none; border: 1px solid var(--line); color: #ffb37e;
  border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 800;
  width: 100%; cursor: pointer; margin: 7px 0;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 15px; margin: 13px 0;
}
.preview {
  width: 100%; max-height: 310px; object-fit: contain;
  border-radius: 14px; background: #050607; display: none;
}
.row { display: flex; gap: 9px; }
.row > * { flex: 1; }
.field {
  width: 100%; background: #0c0f13; border: 1px solid #343c46; color: #fff;
  border-radius: 12px; padding: 12px; margin: 5px 0 10px; font-size: 16px;
}
.label { font-size: 12px; color: var(--muted); font-weight: 800; }

.score { font-size: 62px; font-weight: 1000; line-height: 1; }
.verdict { font-size: 27px; font-weight: 1000; margin: 8px 0; }
.penny { font-size: 20px; font-weight: 950; padding: 13px; border-radius: 13px; margin: 12px 0; }
.high { background: #123c29; color: #78f4ad; }
.worth { background: #443914; color: #ffe378; }
.low { background: #3d2520; color: #ffb59d; }
.factors { padding-left: 20px; color: #d8dce2; }
.hidden { display: none; }
.pill {
  display: inline-block; padding: 5px 9px; border-radius: 99px;
  background: #2a323b; color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .3px;
}
.historyItem { border-top: 1px solid var(--line); padding: 12px 0; }
.historyItem:first-child { border-top: 0; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; text-align: center; font-size: 26px; font-weight: 1000;
}
.stat .sub { font-size: 11px; font-weight: 800; }

.loading {
  text-align: center; color: var(--muted); padding: 20px 0;
}
.spin {
  display: inline-block; width: 26px; height: 26px; border: 3px solid var(--line);
  border-top-color: var(--orange); border-radius: 50%;
  animation: r 0.8s linear infinite;
}
@keyframes r { to { transform: rotate(360deg); } }

.hdBtns { display: grid; gap: 8px; }
.hdOutcomeRow { display: flex; gap: 8px; flex-wrap: wrap; }
.hdOutcome {
  flex: 1 1 45%; background: #0c0f13; color: #fff; border: 1px solid #343c46;
  border-radius: 12px; padding: 12px; font-weight: 800; cursor: pointer; font-size: 14px;
}
.hdOutcome.selected { border-color: var(--orange); background: #2a1a08; color: #ffb37e; }

.banner {
  background: #1c2026; border: 1px dashed var(--line); color: var(--muted);
  border-radius: 14px; padding: 12px; font-size: 13px; margin: 12px 0;
}
.confirmBar {
  background: #0c2a1a; border: 1px solid #2b8152; color: #caffdf;
  border-radius: 14px; padding: 12px; margin: 12px 0; font-size: 13px;
}

nav {
  position: fixed; bottom: 0; left: 0; right: 0; background: #0d1115;
  border-top: 1px solid var(--line); display: flex; max-width: 540px; margin: auto;
}
nav button {
  flex: 1; background: none; border: 0; color: var(--muted); padding: 13px;
  font-size: 13px; font-weight: 800; cursor: pointer;
}
nav button.on { color: var(--orange); }
