:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: #0c0f0b;
  color: #dfe9d9;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  -webkit-tap-highlight-color: transparent;
}
a { color: #7ee08a; }
b { color: #f0f7ec; }
code { color: #c9beae; }

#app { max-width: 640px; margin: 0 auto; padding: 0 14px 40px; }

.topbar {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 20px 2px 10px;
}
.brand { font-weight: 700; font-size: 20px; color: #7ee08a; letter-spacing: 0.01em; }
.brand-sub { font-size: 12px; color: #7a8a74; }

.screen.hidden { display: none; }

.intro-card, .meter-card, .summary-card {
  background: linear-gradient(180deg, rgba(126,224,138,0.06), rgba(12,15,11,0.4));
  border: 1px solid rgba(126,224,138,0.16);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.intro-card p { font-size: 14px; line-height: 1.65; color: #cfdac9; margin: 0 0 12px; }
.intro-card p.fine { font-size: 12px; color: #7a8a74; }

.lbl {
  display: block; font-size: 11px; color: #7a8a74;
  text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 6px;
}
.row { display: flex; gap: 8px; }
input[type="text"] {
  flex: 1; font-family: inherit; font-size: 14px;
  padding: 10px 11px; border: 1px solid rgba(126,224,138,0.25);
  border-radius: 8px; background: #131610; color: #f0f7ec;
}
input[type="text"]:focus { outline: 2px solid #7ee08a; outline-offset: 1px; }
button {
  font-family: inherit; font-size: 14px; padding: 10px 16px;
  border: 1px solid #7ee08a; background: #7ee08a; color: #0d1a0f;
  border-radius: 8px; cursor: pointer; font-weight: 700;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: default; }
button.ghost {
  background: transparent; color: #dfe9d9; border-color: rgba(126,224,138,0.3);
  font-weight: 400;
}
button.ghost:hover:not(:disabled) { border-color: #7ee08a; }
button.small { padding: 7px 12px; font-size: 12px; }

.msg { min-height: 16px; font-size: 12px; margin: 10px 0 0; color: #7a8a74; }
.msg.err { color: #ff8a68; }

.extra-toggle {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 14px 0 0; font-size: 12px; line-height: 1.55;
  color: #a9bda1; cursor: pointer;
}
.extra-toggle input[type="checkbox"] {
  margin-top: 2px; width: 15px; height: 15px; flex: none;
  accent-color: #7ee08a; cursor: pointer;
}
.extra-toggle b { color: #f0f7ec; }

.meter-card { text-align: center; padding: 32px 24px; }
.meter-status { font-size: 13px; color: #a9bda1; margin-bottom: 18px; min-height: 18px; }
.ticker {
  font-size: 56px; font-weight: 800; letter-spacing: -0.01em;
  color: #ff6a4d; text-shadow: 0 0 24px rgba(255,106,77,0.35);
  font-variant-numeric: tabular-nums;
}
.ticker-dollar { color: #ff8a68; margin-right: 2px; }
.meter-sub { font-size: 12px; color: #7a8a74; margin-top: 14px; min-height: 16px; }
.pulse-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; font-size: 11px; color: #7a8a74; text-transform: uppercase; letter-spacing: 0.06em;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff6a4d;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.summary-card .sumhead {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: #f0f7ec; margin-bottom: 18px;
}
.summary-card .sumhead .av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #222; }
.summary-card .bigcost {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 18px 0 22px; border-bottom: 1px solid rgba(126,224,138,0.12); margin-bottom: 16px;
}
.summary-card .biglabel { font-size: 11px; color: #7a8a74; text-transform: uppercase; letter-spacing: 0.08em; }
.summary-card .bigval {
  font-size: 44px; font-weight: 800; color: #ff6a4d; font-variant-numeric: tabular-nums;
}
.rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.row-line {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: #cfdac9; line-height: 1.5;
}
.row-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-line.total { color: #f0f7ec; font-weight: 700; border-top: 1px dashed rgba(126,224,138,0.2); padding-top: 8px; margin-top: 2px; }
.row-line.total span:last-child { color: #ff6a4d; }
.row-line.free { color: #7ee08a; font-weight: 700; }
.row-line.free span:last-child { color: #7ee08a; }

.summary-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-card a.sharebtn { text-decoration: none; display: inline-block; }

.startover { text-align: center; padding: 6px 0 0; }

footer {
  margin-top: 2.5rem; color: #607059; font-size: 12px;
  border-top: 1px solid rgba(126,224,138,0.12); padding-top: 1rem; line-height: 1.6;
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .ticker { font-size: 42px; }
  .summary-card .bigval { font-size: 34px; }
}
