:root{
  --bg:#fff7fb;
  --card:#ffffff;
  --pink:#ff4da6;
  --pink2:#ff8ac7;
  --text:#1f1f1f;
  --muted:#6b7280;
  --border:#f3c6dd;
  --shadow: 0 10px 30px rgba(255,77,166,.08);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans TC, "PingFang TC", "Microsoft JhengHei", sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--pink); text-decoration:none}
a:hover{text-decoration:underline}
.container{
  max-width:520px;
  margin:0 auto;
  padding:16px 16px 88px;
}
.topbar{
  position:sticky; top:0;
  background:rgba(255,247,251,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(243,198,221,.7);
  z-index:10;
}
.topbar .inner{
  max-width:520px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800;
}
.brand .dot{
  width:12px; height:12px; border-radius:999px;
  background:linear-gradient(135deg,var(--pink),var(--pink2));
  box-shadow:0 8px 18px rgba(255,77,166,.25);
}
/* Topbar brand clickable (keep original single-line title) */
a.brand{ color:inherit; text-decoration:none; }
a.brand:hover{ text-decoration:none; opacity:.95; }
.brand-title{ font-weight:800; }

.badge{
  display:inline-flex; align-items:center; gap:6px;
  background:#fff;
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}
.card + .card{margin-top:12px}
.h1{font-size:20px; font-weight:900; margin:0 0 8px}
.h2{font-size:16px; font-weight:800; margin:0 0 8px}
.p{margin:0; color:var(--muted); line-height:1.6}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.kv{
  display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  padding:10px 0; border-bottom:1px dashed rgba(243,198,221,.9);
}
.kv:last-child{border-bottom:none}
.kv .k{color:var(--muted); font-size:12px}
.kv .v{font-weight:800}
.btn{
  appearance:none;
  border:none;
  background:linear-gradient(135deg,var(--pink),var(--pink2));
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  font-weight:800;
  width:100%;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(255,77,166,.18);
}
.btn.secondary{
  background:#fff;
  color:var(--pink);
  border:1px solid var(--border);
  box-shadow:none;
}
.btn.small{padding:10px 12px; border-radius:12px; font-size:14px}
.row{display:flex; gap:10px}
.row .btn{flex:1}
.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  outline:none;
  background:#fff;
  font-size:15px;
}
.input:focus{border-color:rgba(255,77,166,.55); box-shadow:0 0 0 4px rgba(255,77,166,.12)}
.label{display:block; font-size:13px; color:var(--muted); margin:10px 0 6px}
.helper{font-size:12px; color:var(--muted); margin-top:8px; line-height:1.5}
.alert{
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
.alert.error{border-color:#fecaca; background:#fff1f2; color:#7f1d1d}
.alert.ok{border-color:#bbf7d0; background:#f0fdf4; color:#14532d}
.table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.table th, .table td{
  text-align:left;
  padding:10px 8px;
  border-bottom:1px solid rgba(243,198,221,.7);
}
.table th{color:var(--muted); font-weight:800; font-size:12px}
.muted{color:var(--muted)}
.mini{font-size:12px}
.hr{height:1px;background:rgba(243,198,221,.9); margin:12px 0}
.bottomnav{
  position:fixed; left:0; right:0; bottom:0;
  background:#fff;
  border-top:1px solid rgba(243,198,221,.8);
}
.bottomnav .inner{
  max-width:520px; margin:0 auto;
  display:grid; grid-template-columns:repeat(4,1fr);
}
.navitem{
  padding:10px 8px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  color:var(--muted);
  font-size:12px;
}
.navitem.active{color:var(--pink); font-weight:800}
.navicon{
  width:22px; height:22px;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 2px;
  background:none;
  border-radius:0;
  box-shadow:none;
}
.navicon svg{
  width:22px; height:22px;
  display:block;
}
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  background:#fff;
  border:1px dashed rgba(243,198,221,.9);
  padding:10px;
  border-radius:12px;
  overflow:auto;
}
@media (min-width:900px){
  .container{padding-bottom:24px}
  .bottomnav{display:none}
}
