:root{
  --bg0:#070a12;
  --bg1:#0b1020;
  --bg2:#120a2a;
  --ink:#0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --border:rgba(15,23,42,.10);
  --shadow: 0 18px 55px rgba(2,6,23,.18);
  --shadow2: 0 10px 30px rgba(2,6,23,.10);

  --brand0:#4c1d95;
  --brand1:#7c3aed;
  --brand2:#a855f7;

  --radius:18px;
  --pill:999px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background: radial-gradient(1200px 500px at 20% 5%, rgba(168,85,247,.22), transparent 55%),
              radial-gradient(900px 500px at 80% 0%, rgba(124,58,237,.18), transparent 52%),
              linear-gradient(180deg, #f4f1ff 0%, #f7f8fb 40%, #f3f4f6 100%);
}

/* top bar */
.topbar{
  background: radial-gradient(1100px 400px at 20% 0%, rgba(168,85,247,.35), transparent 60%),
              radial-gradient(900px 400px at 80% 0%, rgba(124,58,237,.28), transparent 60%),
              linear-gradient(90deg, #050816 0%, #170a2e 55%, #3b0764 100%);
  color:#fff;
  padding:18px 22px;
}
.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand-badge{
  width:34px;height:34px;border-radius:12px;
  background: radial-gradient(circle at 30% 30%, #c084fc, #7c3aed 60%, #4c1d95 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  flex:0 0 auto;
}
.brand-title{line-height:1.1; min-width:0}
.brand-title .h{
  font-weight:800;
  font-size:20px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-title .sub{
  margin-top:2px;
  font-size:13px;
  color:rgba(255,255,255,.70);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nav{
  display:flex;
  gap:10px;
  align-items:center;
  flex:0 0 auto;
}
.nav a{
  color:#fff;
  text-decoration:none;
  font-weight:650;
  font-size:14px;
  padding:8px 14px;
  border-radius:var(--pill);
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
}
.nav a:hover{ background: rgba(255,255,255,.12); }

/* page layout */
.shell{
  max-width:1100px;
  margin:0 auto;
  padding:26px 18px 50px;
}
.center{
  min-height: calc(100vh - 110px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:34px;
}
.card{
  width: min(360px, 25vw);
  min-width: 320px;
  max-width: 360px;
  background: rgba(255,255,255,.85);
  border:1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card-inner{ padding:22px 22px 20px; }
.card h2{
  margin:0 0 6px;
  font-size:20px;
  letter-spacing:-.01em;
}
.card p{
  margin:0 0 14px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

.field{ margin: 12px 0; }
label{
  display:block;
  font-size:12px;
  font-weight:700;
  color: rgba(15,23,42,.75);
  margin:0 0 6px;
}
input, .hintbox{
  width:100%;
  border-radius: 12px;
  border:1px solid rgba(15,23,42,.14);
  padding:12px 12px;
  font-size:14px;
  background: rgba(255,255,255,.95);
  outline:none;
}
input:focus{
  border-color: rgba(124,58,237,.45);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}
input[readonly]{
  background: rgba(241,245,249,.9);
  color: rgba(15,23,42,.72);
}

.hint{
  margin-top:8px;
  font-size:12px;
  color: rgba(100,116,139,.95);
}

.row{
  display:flex;
  gap:10px;
}
.row > *{ flex:1; }

.actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  border:0;
  border-radius: 14px;
  padding:12px 14px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  text-decoration:none;
}
.btn.primary{
  color:#fff;
  background: linear-gradient(90deg, #5b21b6 0%, #7c3aed 55%, #a855f7 100%);
  box-shadow: 0 14px 35px rgba(124,58,237,.25);
}
.btn.primary:hover{ filter: brightness(1.03); }
.btn.secondary{
  color: rgba(15,23,42,.85);
  background: rgba(255,255,255,.90);
  border:1px solid rgba(15,23,42,.12);
  box-shadow: var(--shadow2);
}
.btn.secondary:hover{ background: rgba(255,255,255,.98); }

.hr{
  height:1px;
  background: rgba(15,23,42,.10);
  margin:16px 0;
}

.smallnote{
  font-size:12px;
  color: rgba(100,116,139,.95);
  line-height:1.45;
}

/* stack always (you asked for vertical) */
@media (max-width: 720px){
  .row{ flex-direction:column; }
}

/* make sure file:// works nicely too */
a{ -webkit-tap-highlight-color: transparent; }

.card h2,
.card h3 {
  text-align: center;
}
