:root {
  --bg: #070b14;
  --card: #101827;
  --line: #1e2a3c;
  --text: #e8eef8;
  --muted: #8b9bb4;
  --accent: #3ee0c2;
  --warn: #f0b429;
  --danger: #f07178;
  --ok: #5ee0a8;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif;
}
body { touch-action: manipulation; }
.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}
.hero h1 {
  margin: 8px 0 12px;
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.lede, .hint {
  color: var(--muted);
  line-height: 1.7;
}
.card {
  margin-top: 28px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
textarea {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1220;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button {
  margin-top: 14px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #06241d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.hint { margin: 12px 0 0; font-size: 0.9rem; }
.result { margin-top: 22px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.remain {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ring {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
}
.gb {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.gb span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.meta div {
  padding: 12px;
  background: #0b1220;
  border-radius: 12px;
}
.meta b { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.badge {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.badge.active { background: rgba(94, 224, 168, 0.12); color: var(--ok); }
.badge.expired, .badge.exhausted { background: rgba(240, 113, 120, 0.12); color: var(--danger); }
.fail {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.low .gb { color: var(--warn); }
.empty .gb { color: var(--danger); }
@media (max-width: 420px) {
  .remain { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 1.7rem; }
}
