:root {
  --bg: #0e1014;
  --bg-elev: #16181e;
  --bg-card: #1b1e26;
  --bg-soft: #22262f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f6f1;
  --muted: #9aa19a;
  --accent: #c8f542;
  --accent-ink: #12150c;
  --danger: #ff6b6b;
  --ok: #7dffb3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --font-display: "Syne", sans-serif;
  --font-sans: "Manrope", sans-serif;
}

[data-theme="light"] {
  --bg: #f3f5ef;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #ecefe6;
  --line: rgba(16, 18, 22, 0.08);
  --text: #141711;
  --muted: #5c6358;
  --accent-ink: #141711;
  --shadow: 0 18px 40px rgba(20, 24, 16, 0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: -0.011em;
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 50%),
    radial-gradient(900px 500px at 110% 0%, rgba(120, 140, 255, 0.08), transparent 45%),
    var(--bg);
}
h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.mt-2 { margin-top: 8px; }
.mb { margin-bottom: 16px; }

.banner {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev));
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.banner a { color: var(--accent); }

.site-header, .app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 14px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.soft { background: var(--bg-soft); color: var(--text); }
.btn.danger { background: color-mix(in srgb, var(--danger) 16%, var(--bg-soft)); color: var(--danger); }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--muted);
}
.chip.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

.field, select, textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 12px 14px;
}
label.block { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }

.hero h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.9; }
.hero p { max-width: 520px; }
.hero-img { width: 100%; height: 420px; object-fit: cover; border-radius: 32px; }

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side nav { display: grid; gap: 4px; margin-top: 24px; }
.side a, .tab {
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.side a.active, .tab.active { background: var(--bg-soft); color: var(--text); }
.main { padding: 20px 28px 80px; }
.stat .display { font-size: 40px; margin-top: 8px; }

.progress-track { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); }

.bars { display: flex; align-items: end; gap: 10px; height: 160px; }
.bars span {
  flex: 1;
  background: var(--accent);
  border-radius: 10px 10px 4px 4px;
  min-height: 4px;
}

.set-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.timer {
  text-align: center;
  background: var(--bg-soft);
  border-radius: 24px;
  padding: 24px;
}
.timer .display { font-size: 64px; }

.bottom-nav {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, 1fr);
  padding: 8px;
  z-index: 30;
}
.bottom-nav a { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 8px 4px; border-radius: 12px; }
.bottom-nav a.active { color: var(--accent); }

.choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 18px; border: 1px solid var(--line); cursor: pointer; }
.choice input { margin-top: 4px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottom-nav { display: grid; }
  .set-row { grid-template-columns: 1fr 1fr; }
  .hero-img { height: 240px; }
  .main { padding: 16px 16px 96px; }
}
