:root {
  --page-bg: #e6e6e6;
  --panel-bg: #ffffff;
  --panel-border: #c9c9c9;
  --header-bg: #3a3f44;
  --header-text: #f2f2f2;
  --text: #222222;
  --muted: #6b6b6b;
  --accent: #2f6fb3;
  --energy: #4caf50;
  --nerve: #d9534f;
  --happy: #c9a227;
  --life: #3f7fd1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  margin-bottom: 1rem;
}

.panel-header {
  background: var(--header-bg);
  color: var(--header-text);
  font-weight: bold;
  padding: 0.4rem 0.7rem;
  font-size: 12px;
}

.panel-body { padding: 0.7rem; }

.info-icons { font-size: 18px; letter-spacing: 0.3rem; margin-bottom: 0.5rem; }

.info-row { padding: 0.15rem 0; border-bottom: 1px solid #eee; font-size: 12px; }
.info-label { color: var(--muted); }
.info-value { font-weight: bold; }
.info-value.accent { color: var(--accent); }
.muted-link { color: var(--accent); font-size: 11px; cursor: default; }

.stat-bars { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.stat-row { }
.stat-label-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 0.15rem; }
.stat-value { font-weight: bold; color: var(--text); }
.stat-track { height: 12px; background: #eee; border: 1px solid #ccc; position: relative; }
.stat-fill { height: 100%; }
.stat-fill.energy { background: var(--energy); }
.stat-fill.nerve { background: var(--nerve); }
.stat-fill.happy { background: var(--happy); }
.stat-fill.life { background: var(--life); }
.stat-refill {
  margin-top: 0.15rem;
  font-size: 10px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.stat-refill:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

.profile-header h1 { font-size: 1.4rem; margin: 0.2rem 0 0.8rem; }

.user-info-body { display: flex; gap: 1.2rem; }

.avatar-box {
  width: 160px;
  flex: 0 0 160px;
  border: 1px solid var(--panel-border);
  background: #d7d7d7;
  text-align: center;
}
.avatar-name { background: #222; color: #fff; font-size: 10px; padding: 0.2rem; }
.avatar-silhouette { font-size: 64px; padding: 1.2rem 0; color: #9a9a9a; }

.user-info-details { flex: 1; display: flex; gap: 2rem; align-items: center; }
.eyebrow { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.level-number { font-size: 2.2rem; font-weight: bold; background: #222; color: #fff; padding: 0.1rem 0.5rem; display: inline-block; }
.rank-name { font-weight: bold; background: #ddd; padding: 0.2rem 0.6rem; margin-top: 0.2rem; display: inline-block; }
.rank-tag { font-weight: bold; background: #ddd; padding: 0.2rem 0.6rem; margin-top: 0.3rem; display: inline-block; }
.age-number { font-size: 2.2rem; font-weight: bold; background: #222; color: #fff; padding: 0.1rem 0.5rem; display: inline-block; }

.medal-row { display: flex; gap: 0.8rem; }
.medal-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  position: relative;
}
.medal-tier {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #222;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.info-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.info-table td { padding: 0.4rem 0.7rem; border-bottom: 1px solid #eee; }
.info-table td:first-child { color: var(--muted); width: 40%; }

.placeholder { color: var(--muted); font-size: 12px; }
