:root {
  --bg0: #070708;
  --bg1: #101012;
  --card: #17171b;
  --card-2: #1e1e24;
  --text: #f5f5f7;
  --muted: #9aa0ad;
  --orange: #ff6a00;
  --orange-2: #ff8a2a;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.16);
  --ok: #3b82f6;
  --line: rgba(255,255,255,0.08);
  --radius: 22px;
  --shadow: 0 12px 28px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(255,106,0,.22), transparent 55%),
    radial-gradient(700px 380px at 0% 10%, rgba(59,130,246,.16), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

.app {
  max-width: 430px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.hero { margin-bottom: 14px; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 48px; height: 48px; border-radius: 14px;
  background:
    radial-gradient(circle at 30% 25%, #ffb16a, transparent 45%),
    linear-gradient(145deg, var(--orange), #c2410c);
  box-shadow: 0 10px 22px rgba(255,106,0,.35);
  position: relative;
}
.logo::after {
  content: "";
  position: absolute; inset: 11px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
}
.brand-name { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.brand-sub { color: var(--muted); font-size: 14px; margin-top: 3px; }

.top-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip-blue { border-color: rgba(59,130,246,.35); background: var(--blue-soft); color: #93c5fd; }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-top: 14px;
}
.sub-card {
  background:
    linear-gradient(160deg, rgba(255,106,0,.12), transparent 40%),
    linear-gradient(180deg, #1c1c22, #141418);
}
.card-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.card-title.center { text-align: center; margin-bottom: 14px; }

.days {
  font-size: 42px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.04em;
  line-height: 1;
}
.days-label { color: var(--orange-2); font-weight: 700; margin-top: 4px; }
.until { margin-top: 8px; color: var(--muted); font-size: 14px; }
.meta { margin: 14px 0 16px; color: var(--text); font-size: 14px; line-height: 1.55; }
.ok { color: var(--blue); font-weight: 700; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #140800;
  box-shadow: 0 10px 22px rgba(255,106,0,.28);
}
.btn.big { padding: 18px 16px; font-size: 18px; letter-spacing: 0.02em; }
.btn.ghost {
  margin-top: 10px;
  background: var(--blue-soft);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,.25);
}
.btn.secondary {
  background: #111114;
  color: var(--text);
  border: 1px solid var(--line);
}
.hint {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.bot {
  margin-top: 18px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.menu-card { padding: 6px; }
.menu-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.menu-item:last-child { border-bottom: 0; }
.arrow { color: var(--muted); font-size: 20px; }

.sheet {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.62);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px;
  z-index: 40;
}
.sheet.hidden { display: none; }
.sheet-inner {
  width: min(430px, 100%);
  background: #15151a;
  border: 1px solid var(--line);
  border-radius: 22px 22px 18px 18px;
  padding: 18px 16px 14px;
  max-height: min(82vh, 720px);
  overflow: auto;
}
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.plan {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: #101014;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  width: 100%;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.plan span { color: var(--orange); font-weight: 800; }

.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.os-btn {
  border: 1px solid var(--line);
  background: #101014;
  color: var(--text);
  border-radius: 16px;
  padding: 16px 10px;
  font-weight: 700;
  cursor: pointer;
}
.os-btn:hover { border-color: rgba(255,106,0,.45); }
.os-btn small { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; font-size: 11px; }
.key-card {
  background:
    linear-gradient(200deg, rgba(59,130,246,.12), transparent 42%),
    linear-gradient(180deg, #1c1c22, #141418);
}

.page {
  position: fixed; inset: 0;
  background: var(--bg0);
  z-index: 50;
  overflow: auto;
}
.page.hidden { display: none; }
.page-bar {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: rgba(10,10,12,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.back {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
}
.page-title { font-weight: 800; font-size: 16px; }
.page-body {
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
}
.page-body h3 { margin: 18px 0 8px; font-size: 16px; }
.page-body ol, .page-body ul { padding-left: 18px; margin: 8px 0; }
.page-body li { margin: 6px 0; }
.page-body a { color: #93c5fd; }
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 10px 0;
}
.step-card .n {
  display: inline-flex;
  width: 24px; height: 24px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: var(--orange);
  color: #140800;
  font-weight: 800;
  font-size: 12px;
  margin-right: 8px;
}
.app-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #101014;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  margin: 8px 0;
  font-weight: 700;
}
.app-link span { color: var(--blue); font-size: 13px; font-weight: 700; }
.note {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  color: #bfdbfe;
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
  font-size: 13px;
}
.code {
  word-break: break-all;
  background: #0c0c10;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
  color: #fdba74;
}
.sheet-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #101014;
  color: var(--text);
  padding: 12px;
  font: inherit;
  margin-bottom: 10px;
}
textarea:focus {
  outline: none;
  border-color: rgba(59,130,246,.45);
}
