:root{
  --bg:#0b0f19;
  --panel:#10182a;
  --panel2:#0f1526;
  --text:#f1f5ff;
  --muted:rgba(241,245,255,.68);
  --line:rgba(241,245,255,.10);
  --accent:#1ec8b4;
  --accent2:#4aa3ff;
  --danger:#ff5c7a;
  --shadow: 0 12px 32px rgba(0,0,0,.40);
  --radius: 18px;
  --radius2: 14px;
  --tap: 52px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1000px 600px at 20% 10%, rgba(30,200,180,.12), transparent 60%),
              radial-gradient(900px 650px at 85% 18%, rgba(74,163,255,.10), transparent 55%),
              var(--bg);
  color:var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}

a{color:inherit}
strong{font-weight:700}

.app{
  min-height:100%;
  display:flex;
  flex-direction:column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(11,15,25,.70);
}

.brand{display:flex; gap:12px; align-items:center}
.brand__icon{
  width:40px;
  height:40px;
  border-radius:12px;
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}
.brand__name{font-weight:800; letter-spacing:.2px}
.brand__sub{font-size:12px; color:var(--muted)}

.iconbtn{
  height:44px;
  width:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
}

.icon{font-size:18px; opacity:.95}

.content{
  padding: 16px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.panel{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.hero{
  display:flex;
  flex-direction:column;
}

.hero__left, .hero__right{
  padding: 18px;
}

.hero__title{
  margin:0 0 6px;
  font-size:24px;
  letter-spacing:.2px;
}
.hero__desc{margin:0 0 14px; color:var(--muted)}
.hero__cta{display:flex; gap:10px; flex-wrap:wrap}

.btn{
  min-height: var(--tap);
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  color:var(--text);
  font-weight:700;
  letter-spacing:.2px;
}
.btn.primary{
  border-color: rgba(30,200,180,.40);
  background: linear-gradient(180deg, rgba(30,200,180,.25), rgba(30,200,180,.10));
}
.btn.ghost{
  background: transparent;
}
.btn:active{transform: translateY(1px)}
.btn[disabled]{opacity:.5}

.mini{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.mini__item{
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.15);
}
.mini__label{font-size:12px; color:var(--muted)}
.mini__value{font-weight:800; margin-top:4px}

.card{
  margin-top:2px;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  overflow:hidden;
}
.card__header{
  padding: 14px 14px 10px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.card__title{font-weight:900; letter-spacing:.2px}
.card__sub{font-size:12px; color:var(--muted); margin-top:2px}

.pill{
  font-size:12px;
  font-weight:800;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(30,200,180,.30);
  background: rgba(30,200,180,.12);
}

.workout{
  padding: 0 14px 10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.exercise{
  padding: 10px 12px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.exercise__name{font-weight:900}
.exercise__meta{color:var(--muted); font-size:13px; margin-top:3px}
.exercise__row{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.chip{
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.12);
  font-size:12px;
  color: var(--text);
  font-weight:700;
}

.card__footer{
  padding: 12px 14px 14px;
  display:flex;
  gap:10px;
}
.card__footer .btn{flex:1}

.installTip{
  margin-top:12px;
  padding: 12px 14px;
  border-radius: 16px;
  border:1px dashed rgba(241,245,255,.22);
  background: rgba(255,255,255,.04);
}
.installTip__title{font-weight:900}
.installTip__text{color:var(--muted); font-size:13px; margin-top:4px}

.grid{
  display:grid;
  grid-template-columns: 1fr;
}
.grid__item{
  padding: 14px 16px;
  border-top:1px solid var(--line);
}
.grid__item:first-child{border-top:none}
.grid__title{font-weight:900}
.grid__body{margin-top:6px}
.muted{color:var(--muted)}

.nav{
  position:sticky;
  bottom:0;
  display:flex;
  gap:8px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  background: rgba(11,15,25,.75);
  backdrop-filter: blur(10px);
}
.nav__btn{
  flex:1;
  min-height: 48px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-weight:800;
  letter-spacing:.15px;
}
.nav__btn.is-active{
  border-color: rgba(74,163,255,.40);
  background: linear-gradient(180deg, rgba(74,163,255,.22), rgba(74,163,255,.08));
}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:flex-end;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,.55);
  z-index:50;
}
.modal.is-open{display:flex}
.modal__sheet{
  width:100%;
  max-width: 560px;
  border-radius: 22px;
  border:1px solid var(--line);
  background: rgba(16,24,42,.96);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__head{
  padding: 14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.modal__title{font-weight:900}
.modal__body{
  padding: 14px;
  max-height: 70vh;
  overflow:auto;
}

.form{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.label{font-size:12px; color:var(--muted); font-weight:800}
.input, select{
  width:100%;
  min-height: 46px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.20);
  color:var(--text);
  padding: 10px 12px;
  outline:none;
}
.row{display:flex; gap:10px}
.row > *{flex:1}

.notice{
  border-radius: 16px;
  border:1px solid rgba(30,200,180,.25);
  background: rgba(30,200,180,.08);
  padding: 12px 12px;
  color: var(--text);
}
.notice small{display:block; color:var(--muted); margin-top:4px}

hr.sep{
  border:0;
  border-top:1px solid var(--line);
  margin: 12px 0;
}

/* Wider screens: two-column hero */
@media (min-width: 860px){
  .hero{
    flex-direction:row;
  }
  .hero__left{flex:1.1}
  .hero__right{flex:0.9; border-left:1px solid var(--line)}
  .grid{grid-template-columns: repeat(3, 1fr)}
  .grid__item{border-top:none; border-left:1px solid var(--line)}
  .grid__item:first-child{border-left:none}
}
