:root {
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --text: #111111;
  --muted: #4b5563;
  --green: #16a34a;
  --green-dark: #15803d;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --line: #e5e7eb;
  --shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--blue); }
.hidden { display: none !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px 16px 88px; }
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand span { color: var(--green); }
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1.2fr 1fr 1fr; }
h1, h2, h3 { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 16px; background: #fff; color: var(--text);
}
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 6px; }
.btn {
  border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700;
  cursor: pointer; font-size: 15px;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-black { background: #111; color: #fff; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.notice {
  background: #ecfdf5; color: #14532d; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.error {
  background: #fef2f2; color: #991b1b; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.hp { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.hp > i { display: block; height: 100%; background: var(--green); }
.xp > i { background: var(--blue); }
.nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px;
}
.nav button { flex: 1; min-width: 110px; }
.nav button.active { outline: 2px solid var(--blue); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; background: #f9fafb; border-radius: 12px;
}
.loader {
  position: fixed; inset: 0; background: rgba(244,245,247,0.72);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.loader-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 26px; width: min(360px, 90vw); text-align: center;
}
.loader-title { font-weight: 800; margin-bottom: 12px; }
.bar { height: 10px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--blue)); transition: width .2s; }
.log { font-size: 13px; color: var(--muted); max-height: 160px; overflow: auto; white-space: pre-wrap; }
.auth { max-width: 420px; margin: 40px auto; }
@media (max-width: 960px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .wrap { padding-bottom: 108px; }
  .nav {
    position: sticky; bottom: 0; background: #fff; box-shadow: 0 -8px 24px rgba(17,17,17,.08);
    margin: 0 -16px; padding: 10px 12px; z-index: 20;
  }
  .nav button { min-width: 0; font-size: 13px; padding: 10px 8px; }
  .top { flex-direction: column; align-items: flex-start; }
}
