/* 视觉基线来自 reference/状态查看样例.html，正式页补登录与工具栏，不改暗色风。 */
:root {
  --bg: #f3ead8;
  --bg2: #e8dcc4;
  --paper: #fffaf0;
  --paper2: #f7f0e2;
  --ink: #2c2418;
  --muted: #7a6c58;
  --line: #e2d3b8;
  --gold: #b8892a;
  --gold2: #d4a017;
  --gold-soft: #f3e2b6;
  --ok: #2f7d4a;
  --ok-bg: #e7f4ea;
  --warn: #a15c14;
  --warn-bg: #fdecd3;
  --lock: #8a6a1a;
  --danger: #8b2e2e;
  --danger-bg: #fde8e8;
  --shadow: 0 10px 30px rgba(80, 55, 20, .08);
  --radius: 16px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background:
  radial-gradient(1200px 500px at 10% -10%, #fff6e4, transparent 50%),
  linear-gradient(180deg, #f7efdd 0%, var(--bg) 40%, var(--bg2) 100%);
  color: var(--ink); min-height: 100%; }
body { padding: 36px 28px 64px; }
.wrap { max-width: 1180px; margin: 0 auto; }
header.hero {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 22px; flex-wrap: wrap;
}
.kicker { color: var(--gold); font-size: 12px; letter-spacing: .16em; font-weight: 600; }
h1 { margin: 6px 0 8px; font-size: 34px; font-weight: 750; letter-spacing: -.02em; }
.sub { margin: 0; color: var(--muted); max-width: 680px; line-height: 1.65; }
.toolbar {
  display: flex; gap: 10px; align-items: end; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow); flex-wrap: wrap;
}
label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
select, button, input[type="text"], input[type="password"] {
  font: inherit; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--line);
  color: var(--ink); background: #fff;
}
select { min-width: 168px; }
input[type="text"], input[type="password"] { width: 100%; }
button.primary {
  background: linear-gradient(180deg, #d7ae4a, #b8892a);
  color: #fff; border: 0; font-weight: 650; cursor: pointer;
  box-shadow: 0 1px 0 #f3e2b6 inset, 0 6px 14px rgba(184,137,42,.28);
}
button.primary:hover:not(:disabled) { filter: brightness(1.05); }
button.primary:disabled { opacity: .55; cursor: not-allowed; filter: none; }
button.ghost {
  background: #fff; color: var(--ink); cursor: pointer;
}
button.ghost:hover { background: var(--paper2); }
.user-chip { font-size: 13px; color: var(--ink); padding-bottom: 8px; white-space: nowrap; }
.user-chip strong { font-weight: 650; }
.callout {
  margin: 18px 0 14px; padding: 14px 16px; background: #fff8e6;
  border: 1px solid #ead7a4; border-radius: 12px; color: #5c4a28; line-height: 1.7;
}
.callout.error { background: var(--danger-bg); border-color: #e3b6b6; color: var(--danger); }
.note { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.hidden { display: none !important; }
#content { display: none; }
#content.show { display: block; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
h2 { margin: 0 0 6px; font-size: 16px; }
.caption { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr.active { background: linear-gradient(90deg, #fff4d4, #fffaf0); }
#overview tr { cursor: pointer; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.lock { background: #f6ebc8; color: var(--lock); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  border: 1px solid var(--line); background: #fff; padding: 8px 14px;
  border-radius: 999px; cursor: pointer; color: var(--ink);
}
.tab.on {
  background: linear-gradient(180deg, #fff4d0, #f3e2b6);
  border-color: #d4b56a; font-weight: 650;
}
.metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 8px 0 16px; }
.metric {
  background: linear-gradient(180deg, #fff, var(--paper2));
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.metric b { display: block; font-size: 20px; letter-spacing: -.02em; }
.metric span { color: var(--muted); font-size: 12px; }
.metric small { display: block; color: var(--gold); font-size: 11px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.props { display: grid; grid-template-columns: 88px 1fr; gap: 7px 12px; margin: 0; }
.props dt { color: var(--muted); font-size: 13px; }
.props dd { margin: 0; }
.team-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; flex-wrap: wrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(180deg, #f3e2b6, #d4a017);
  color: #5a3f10; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e2c57a;
}
.team-label { color: var(--muted); font-size: 12px; }
.equip-list { display: flex; flex-direction: column; gap: 8px; }
.equip-row {
  display: grid; grid-template-columns: 52px 64px 1fr; gap: 10px; align-items: center;
}
.equip-row .part { color: var(--muted); font-size: 12px; }
.cell {
  width: 52px; height: 52px; border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.7), transparent 40%),
    repeating-linear-gradient(45deg, #f3ead8 0 6px, #efe4cd 6px 12px);
  border: 1px solid #d7c6a4;
  box-shadow: inset 0 1px 2px rgba(90,60,20,.08), 0 1px 0 #fff;
  display: flex; align-items: center; justify-content: center;
  position: relative; flex: none;
}
.cell img {
  width: 40px; height: 40px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.bag-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  gap: 10px;
}
.bag-slot {
  background: linear-gradient(180deg, #fffdf8, #f4ead6);
  border: 1px solid #d7c6a4;
  border-radius: 14px;
  min-height: 108px;
  padding: 8px 8px 10px;
  position: relative;
  box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgba(90,60,20,.05);
}
.bag-slot.empty { opacity: .72; }
.bag-slot .cell { margin: 0 auto 8px; }
.bag-slot .name {
  font-size: 12px; text-align: center; line-height: 1.35;
  min-height: 32px; display: flex; align-items: center; justify-content: center;
}
.bag-slot .qty {
  position: absolute; right: 8px; top: 8px;
  background: rgba(44,36,24,.86); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 8px; padding: 1px 6px;
}
.bag-slot .lock-flag { position: absolute; left: 8px; top: 8px; }
.bag-slot .idx { position: absolute; left: 8px; bottom: 6px; font-size: 10px; color: #b3a48c; }
.pet-list { display: flex; flex-direction: column; gap: 8px; }
.pet {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--paper2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.pet b { font-size: 14px; }
.pet .hp { color: var(--muted); font-size: 12px; }
.login-wrap { max-width: 420px; margin: 8vh auto 0; }
.login-card { padding: 28px 28px 24px; }
.login-card h1 { font-size: 28px; }
.field { margin: 0 0 14px; }
.login-actions { margin-top: 8px; }
.login-actions button { width: 100%; padding: 11px 14px; }
.hint { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
@media (max-width: 980px) {
  .grid3, .grid2, .metrics { grid-template-columns: 1fr 1fr; }
  .bag-grid { grid-template-columns: repeat(4, minmax(88px, 1fr)); }
}
@media (max-width: 640px) {
  .metrics, .grid3, .grid2 { grid-template-columns: 1fr; }
  .bag-grid { grid-template-columns: repeat(2, minmax(88px, 1fr)); }
  body { padding: 18px 14px 40px; }
}
