:root {
  --bg: #07162d;
  --panel: rgba(255, 255, 255, 0.1);
  --card: #f8fbff;
  --card-soft: #edf5ff;
  --text: #ebf4ff;
  --muted: rgba(235, 244, 255, 0.7);
  --ink: #12233f;
  --ink-soft: #536884;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #0b5bd3;
  --blue-deep: #0b3b8f;
  --amber: #f4a621;
  --orange: #f27037;
  --shadow: 0 24px 60px rgba(0, 10, 30, 0.22);
  --radius-xl: 28px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(40, 178, 215, 0.3), transparent 32%),
    radial-gradient(circle at top left, rgba(242, 112, 55, 0.18), transparent 28%),
    linear-gradient(180deg, #0a1c39 0%, #07162d 100%);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }

button,
input,
textarea,
select { font: inherit; }

button { border: 0; cursor: pointer; }

.shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 20px 18px 0;
}

.hero,
.panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  padding: 26px 22px;
  background:
    linear-gradient(135deg, rgba(244, 166, 33, 0.16), transparent 38%),
    linear-gradient(160deg, rgba(40, 178, 215, 0.2), rgba(11, 59, 143, 0.92));
}

.hero h1,
.view-title,
.card h3,
.sheet h3,
.list-item h3,
.post h3,
.section-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.hero h1,
.view-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.panel {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  padding: 18px;
}

.topline,
.toolbar,
.metric-row,
.section-head,
.sheet-actions,
.split {
  display: flex;
  gap: 12px;
}

.topline,
.metric-row,
.section-head {
  align-items: center;
  justify-content: space-between;
}

.toolbar,
.sheet-actions {
  flex-wrap: wrap;
}

.section-head { margin: 24px 0 14px; }

.subtle,
.caption { color: var(--muted); }

.cards,
.list,
.store-grid,
.stat-grid,
.form-grid,
.exercise-list {
  display: grid;
  gap: 12px;
}

.cards,
.store-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.stat-grid {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
}

.stat-label { color: var(--muted); font-size: 0.82rem; }

.stat-value {
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.card,
.sheet,
.post,
.list-item {
  background: var(--card);
  color: var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.card,
.sheet,
.post,
.list-item { padding: 18px; }

.card-soft { background: var(--card-soft); }

.btn,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.btn {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
}

.btn-primary { color: white; background: linear-gradient(135deg, var(--amber), var(--orange)); }
.btn-secondary { color: white; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.18); }
.btn-ink { color: white; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.btn-flat { color: var(--ink); background: #e8f1ff; }

.pill,
.tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.pill { background: rgba(255, 255, 255, 0.12); color: white; }
.tag { background: #e9f2ff; color: var(--blue-deep); }
.tag.success { background: #dcf7ee; color: #0f7d5b; }
.tag.warn { background: #fff1d8; color: #946300; }

.input,
.textarea,
.select {
  width: 100%;
  background: white;
  border: 1px solid #d8e4f5;
  color: var(--ink);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

.textarea { min-height: 110px; resize: vertical; }

.label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric-row { color: var(--ink-soft); font-size: 0.92rem; }

.exercise {
  background: #f4f8ff;
  border: 1px solid #d8e4f5;
  border-radius: 18px;
  padding: 14px;
}

.set-row {
  display: grid;
  grid-template-columns: 58px 1fr 1fr 72px;
  align-items: center;
  gap: 8px;
}

.set-badge {
  text-align: center;
  background: #e6efff;
  color: var(--blue-deep);
  border-radius: 12px;
  padding: 10px 0;
  font-weight: 700;
}

.checkbox { width: 22px; height: 22px; }

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 860px);
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(7, 22, 45, 0.9) 30%);
  z-index: 10;
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(6, 18, 37, 0.75);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
}

.nav-btn {
  min-height: 58px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
}

.nav-btn.active { background: rgba(255, 255, 255, 0.12); color: white; }

.empty { text-align: center; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; }

.tiny { font-size: 0.78rem; }
.muted { color: var(--ink-soft); }
.icon-burst { font-size: 2rem; }

@media (max-width: 720px) {
  .stat-grid,
  .split,
  .cards,
  .store-grid { grid-template-columns: 1fr; }

  .bottom-nav-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .set-row { grid-template-columns: 48px 1fr 1fr 58px; }
}
