:root {
  --bg: #070707;
  --bg2: #0b0b0d;
  --card: rgba(255,255,255,0.075);
  --card2: rgba(255,255,255,0.105);
  --line: rgba(255,255,255,0.12);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted2: #71717a;
  --gold: #d6b46a;
  --gold2: #f2d58b;
  --green: #34d399;
  --red: #fb7185;
  --blue: #93c5fd;
  --violet: #c4b5fd;
  --shadow: 0 24px 80px rgba(0,0,0,0.55);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overscroll-behavior: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(214,180,106,0.22), transparent 22rem),
    radial-gradient(circle at 20% 80%, rgba(196,181,253,0.13), transparent 18rem),
    linear-gradient(180deg, #09090b 0%, #050505 100%);
}
.splash.fade-out { animation: splashOut .36s ease forwards; }
@keyframes splashOut { to { opacity: 0; transform: scale(1.02); } }
.splash-orb {
  position: absolute; width: 260px; height: 260px; border-radius: 999px;
  background: radial-gradient(circle, rgba(214,180,106,.28), transparent 68%);
  filter: blur(20px); animation: breathe 1.7s ease-in-out infinite alternate;
}
@keyframes breathe { from { transform: scale(.96); opacity: .65; } to { transform: scale(1.08); opacity: 1; } }
.splash-logo {
  z-index: 1; width: 92px; height: 92px; border-radius: 32px;
  display: grid; place-items: center; color: #09090b; font-weight: 950; font-size: 32px;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  box-shadow: 0 18px 56px rgba(214,180,106,.24), inset 0 1px 0 rgba(255,255,255,.6);
  animation: logoIn .72s cubic-bezier(.18,.88,.32,1.18) both;
}
@keyframes logoIn { from { transform: translateY(14px) scale(.86); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.splash-title { z-index: 1; margin-top: 20px; font-size: 30px; font-weight: 950; letter-spacing: -0.05em; }
.splash-quote {
  z-index: 1; margin-top: 18px; max-width: 330px; min-height: 84px;
  color: var(--muted); font-size: 15px; line-height: 1.45;
  opacity: 0; transform: translateY(10px); animation: quoteIn .56s ease .72s forwards;
}
@keyframes quoteIn { to { opacity: 1; transform: translateY(0); } }
.splash-skip { position: absolute; bottom: 28px; color: var(--muted2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.app {
  min-height: 100svh; max-width: 480px; margin: 0 auto; position: relative;
  background:
    radial-gradient(circle at top right, rgba(214,180,106,.18), transparent 20rem),
    radial-gradient(circle at bottom left, rgba(39,39,42,.9), transparent 28rem),
    linear-gradient(180deg, #0b0b0d 0%, #060606 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), var(--shadow);
}
.topbar {
  position: sticky; top: 0; z-index: 30; padding: calc(env(safe-area-inset-top) + 14px) 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(9,9,11,.96), rgba(9,9,11,.78));
  backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; color: #0b0b0d; background: linear-gradient(135deg, var(--gold2), var(--gold)); font-weight: 950; }
.brand-title { font-size: 17px; font-weight: 950; letter-spacing: -.04em; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 290px; }
.icon-btn {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,.08); color: var(--text); font-size: 26px; line-height: 1; font-weight: 500;
}
.screen { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); }
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 40;
  width: min(480px, 100%); padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  background: rgba(10,10,12,.92); backdrop-filter: blur(24px); border-top: 1px solid rgba(255,255,255,.08);
}
.nav-btn { border: 0; border-radius: 18px; padding: 11px 4px; background: transparent; color: var(--muted2); font-size: 11px; font-weight: 900; }
.nav-btn.active { background: rgba(214,180,106,.15); color: var(--gold2); box-shadow: inset 0 0 0 1px rgba(214,180,106,.16); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: 0 14px 42px rgba(0,0,0,.24); overflow: hidden;
}
.card-pad { padding: 18px; }
.hero {
  position: relative; padding: 22px; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(214,180,106,.18), rgba(255,255,255,.05)),
    rgba(255,255,255,.08);
}
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 999px; background: rgba(214,180,106,.16); filter: blur(12px); }
.eyebrow { color: var(--gold2); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 950; }
.h1 { margin: 8px 0 0; font-size: 30px; font-weight: 950; letter-spacing: -.07em; line-height: .98; }
.h2 { margin: 0; font-size: 22px; font-weight: 950; letter-spacing: -.05em; }
.h3 { margin: 0; font-size: 17px; font-weight: 950; letter-spacing: -.04em; }
.p { margin: 8px 0 0; color: var(--muted); line-height: 1.46; font-size: 14px; }
.quote { font-size: 17px; line-height: 1.35; color: var(--text); font-weight: 800; }
.quote small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.metric { padding: 14px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.metric .label { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.metric .value { margin-top: 6px; font-size: 22px; font-weight: 950; letter-spacing: -.05em; }
.metric .sub { margin-top: 3px; color: var(--muted2); font-size: 12px; }
.progress-line { height: 9px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress-line > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold2)); width: 0%; transition: width .25s ease; }

.btn {
  width: 100%; border: 0; border-radius: 22px; padding: 15px 16px; font-weight: 950;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #111; box-shadow: 0 16px 36px rgba(214,180,106,.16);
}
.btn:active { transform: scale(.99); }
.btn.secondary { background: rgba(255,255,255,.09); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.btn.red { background: rgba(251,113,133,.13); color: #fecdd3; border: 1px solid rgba(251,113,133,.22); box-shadow: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 9px 12px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 12px; font-weight: 900; }
.pill.active { color: #111; background: linear-gradient(135deg, var(--gold2), var(--gold)); border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 900; }
.input, .select, .textarea {
  width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  background: rgba(255,255,255,.08); color: var(--text); padding: 13px 14px; outline: none;
}
.select option { background: #18181b; color: var(--text); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(214,180,106,.58); box-shadow: 0 0 0 3px rgba(214,180,106,.09); }

.todo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 20px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.todo.done { opacity: .68; }
.todo.done .todo-title { text-decoration: line-through; color: var(--muted2); }
.check { width: 28px; height: 28px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); color: transparent; background: rgba(255,255,255,.06); }
.todo.done .check { color: #08130f; background: var(--green); border-color: transparent; }
.todo-title { font-weight: 900; }
.todo-sub { color: var(--muted2); font-size: 12px; margin-top: 2px; }

.onboarding { min-height: calc(100svh - 120px); display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.steps { display: flex; gap: 6px; margin: 12px 0; }
.step-dot { height: 7px; flex: 1; border-radius: 999px; background: rgba(255,255,255,.12); }
.step-dot.active { background: linear-gradient(90deg, var(--gold), var(--gold2)); }

.session-header { position: sticky; top: 72px; z-index: 20; margin: -16px -16px 14px; padding: 12px 16px; background: rgba(9,9,11,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.07); }
.exercise-card { padding: 20px; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 40px; gap: 7px; align-items: end; padding: 9px; border-radius: 18px; background: rgba(255,255,255,.055); margin-top: 8px; }
.set-no { padding-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 950; text-align: center; }
.small-input { width: 100%; padding: 10px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.11); background: rgba(0,0,0,.18); color: var(--text); outline: none; text-align: center; font-weight: 850; }
.small-label { display: block; color: var(--muted2); font-size: 10px; font-weight: 900; text-align: center; margin-bottom: 4px; }
.round-check { width: 38px; height: 38px; border-radius: 15px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.08); color: var(--muted); font-weight: 950; }
.round-check.done { background: var(--green); color: #06130e; border-color: transparent; }

.map-wrap { height: 420px; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
#map { height: 100%; width: 100%; }
.leaflet-container { background: #111; color: #111; }
.route-list { display: flex; flex-direction: column; gap: 10px; }
.route-item { padding: 14px; border-radius: 20px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo { overflow: hidden; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.photo img { width: 100%; height: 190px; object-fit: cover; display: block; }
.photo div { padding: 10px; font-size: 12px; color: var(--muted); }

.accordion { border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.045); }
.accordion summary { padding: 15px; font-weight: 950; cursor: pointer; }
.accordion .acc-body { padding: 0 15px 15px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 80; background: rgba(244,244,245,.94); color: #111; border-radius: 999px; padding: 11px 15px; font-size: 13px; font-weight: 900; box-shadow: var(--shadow); }
.empty { padding: 20px; text-align: center; color: var(--muted); border: 1px dashed rgba(255,255,255,.15); border-radius: 24px; }
.hr { height: 1px; background: rgba(255,255,255,.09); margin: 14px 0; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; }
.gap8 { gap: 8px; } .gap10 { gap: 10px; }
.muted { color: var(--muted); } .muted2 { color: var(--muted2); }
.green { color: var(--green); } .gold { color: var(--gold2); } .redText { color: var(--red); }
@media (min-width: 700px) { body { background: #020202; } .app { min-height: 100vh; } }
