:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --muted:#5c6b85;
  --text:#0f172a;
  --brand:#0b3aa6;
  --brand2:#6a0dad;
  --border:rgba(15,23,42,.10);
  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 600px at 10% 10%, rgba(11,58,166,.12), transparent 55%),
    radial-gradient(900px 500px at 90% 20%, rgba(106,13,173,.10), transparent 50%),
    var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}

.app-shell{min-height:100vh; display:flex; flex-direction:column;}

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

.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:38px; height:38px;
  border-radius:12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: var(--shadow);
}
.title{font-weight:900; letter-spacing:.2px}
.subtitle{color:var(--muted); font-size:12px; margin-top:2px}

.main{
  flex:1;
  padding:16px 14px 88px;
  max-width: 980px;
  width:100%;
  margin:0 auto;
}

.card{
  background: rgba(255,255,255,.90);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.grid{display:grid; grid-template-columns:1fr; gap:12px;}
@media(min-width:860px){
  .grid.two{grid-template-columns: 1.15fr .85fr;}
  .grid.three{grid-template-columns: 1fr 1fr 1fr;}
}

.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.spread{display:flex; justify-content:space-between; align-items:center; gap:12px}

.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color: var(--muted);
  background: rgba(15,23,42,.03);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  cursor:pointer;
  user-select:none;
  font-weight:800;
}
.btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff;
  border-color: transparent;
}
.btn.ghost{background: rgba(15,23,42,.03)}
.btn.block{width:100%}

.input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--text);
  outline:none;
}
.input::placeholder{color: rgba(15,23,42,.40)}

.small{color:var(--muted); font-size:12px}
.h1{font-size:20px; font-weight:1000; margin:0 0 8px}
.h2{font-size:14px; font-weight:900; margin:0 0 6px}

.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:20;
  display:flex;
  justify-content:space-around;
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--border);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
}
.bottom-nav a{
  font-weight:900;
  font-size:12px;
  color: rgba(15,23,42,.65);
  padding:10px 10px;
  border-radius: 12px;
}
.bottom-nav a.active{
  color: #0f172a;
  background: rgba(15,23,42,.04);
  border:1px solid var(--border);
}

.hr{height:1px; background:var(--border); margin:12px 0}
.notice{
  padding:12px;
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,.20);
  background: rgba(15,23,42,.03);
  color: rgba(15,23,42,.90);
}
