:root {
  --bg: #100f0d;
  --panel: #1c1915;
  --panel-2: #272119;
  --line: #6e5532;
  --gold: #d4a656;
  --gold-soft: #f0d394;
  --text: #f5eee0;
  --muted: #b9aa90;
  --danger: #d55b50;
  --success: #58b882;
  --paper: #e9ddc5;
  --ink: #2a2118;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, #2b241a 0, var(--bg) 55%); color: var(--text); font-family: Inter, Segoe UI, Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #80663b; border-radius: 999px; padding: .25rem .55rem; color: var(--gold-soft); background: #231c13; font-size: .82rem; }
.btn { border: 1px solid #876b3b; border-radius: 8px; background: linear-gradient(#3a3022, #241d15); color: var(--text); padding: .65rem .85rem; box-shadow: inset 0 1px rgba(255,255,255,.08); }
.btn:hover { border-color: var(--gold); filter: brightness(1.08); }
.btn.primary { background: linear-gradient(#b98637, #714a19); border-color: #e3bd70; color: #fff8e8; font-weight: 700; }
.btn.danger { background: linear-gradient(#8b342f, #4d1d1a); border-color: #c95d54; }
.btn.success { background: linear-gradient(#327e56, #1d4c34); border-color: #5cc18a; }
.btn.small { padding: .35rem .5rem; font-size: .85rem; }
.input, input[type="text"], input[type="number"], input[type="date"], select, textarea { width: 100%; border: 1px solid #665438; border-radius: 7px; background: #13110e; color: var(--text); padding: .65rem .7rem; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,166,86,.15); }
textarea { min-height: 110px; resize: vertical; }
label { display: grid; gap: .32rem; color: var(--muted); font-size: .9rem; }
.card { border: 1px solid #665234; background: linear-gradient(145deg, rgba(45,37,27,.97), rgba(24,21,17,.97)); border-radius: 12px; padding: 1rem; box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.card h2, .card h3 { margin-top: 0; color: var(--gold-soft); font-family: Georgia, serif; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stack { display: grid; gap: .75rem; }
.row { display: flex; gap: .65rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.progress { height: 13px; border-radius: 99px; background: #0d0c0a; border: 1px solid #5d4b31; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c1, #b47d31), var(--c2, #f4d488)); transition: width .3s ease; }
.hpbar > span { background: linear-gradient(90deg, #8f2525, #e25445); }
.notice { border-left: 4px solid var(--gold); background: #2b2318; padding: .8rem 1rem; border-radius: 7px; }
.error { border-color: var(--danger) !important; color: #ffd4d0; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; border: 1px dashed #55462f; border-radius: 10px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); background: #111; }
.portrait-square { width: 86px; height: 86px; border-radius: 12px; object-fit: cover; border: 2px solid #8d7144; background: #111; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #8d3d38; display: inline-block; }
.status-dot.online { background: #4bc07e; box-shadow: 0 0 10px #4bc07e; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 1000; background: #1f1a13; border: 1px solid #ad8648; color: #fff3d5; padding: .8rem 1rem; border-radius: 9px; box-shadow: 0 10px 30px #0009; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; max-width: 380px; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
