/* ============================================================
   玩家档案
   ============================================================ */
.profile-body {
  background:
    radial-gradient(900px 520px at 14% -10%, rgba(70,122,103,.14), transparent 62%),
    radial-gradient(800px 520px at 92% 4%, rgba(176,83,58,.08), transparent 60%),
    linear-gradient(180deg, #0b100d 0%, #090c0a 58%, #080b09 100%);
}
.profile-page {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
  padding: 34px 0 64px;
}
.profile-loading,
.profile-empty {
  min-height: 380px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21,27,23,.86), rgba(12,17,14,.86));
  box-shadow: var(--shadow-md);
}
.profile-loading { color: var(--muted); font-size: 13px; }
.profile-empty h1 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
}
.profile-empty p {
  max-width: 480px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.profile-empty .action-btn { justify-self: center; }

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), transparent 34%),
    linear-gradient(180deg, rgba(21,27,23,.92), rgba(12,17,14,.92));
  box-shadow: var(--shadow-lg);
}
.profile-id-row { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 58px; height: 58px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #cf5b44, #9f3d2d);
  color: #fff8ed;
  font-family: var(--font-display);
  font-size: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 24px rgba(0,0,0,.25);
  flex: 0 0 auto;
}
.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
}
.profile-sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.profile-rating-line {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 28px;
}
.profile-rating-label { color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.profile-rating {
  font-family: var(--font-mono);
  font-size: 42px;
  line-height: 1;
  color: #e8dcc7;
  letter-spacing: -.02em;
}
.profile-rating-rd { color: var(--dim); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0; align-self: flex-end; padding-bottom: 5px; }
.profile-confidence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
}
.profile-confidence i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.profile-summary-note { margin-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.75; max-width: 560px; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.profile-stat { padding: 12px 0 11px; min-width: 0; }
.profile-stat + .profile-stat { padding-left: 14px; border-left: 1px solid var(--line); }
.profile-stat span { display: block; color: var(--dim); font-size: 9px; margin-bottom: 4px; }
.profile-stat b { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: #dcd1be; }
.profile-stat small { color: var(--dim); font-family: var(--font-ui); font-size: 9px; font-weight: 400; }
.rank-card {
  border-left: 1px solid var(--line);
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rank-eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.rank-label {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  color: var(--gold);
}
.rank-range { margin-top: 9px; color: #b9ae9c; font-size: 11px; line-height: 1.6; }
.rank-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 9px; line-height: 1.7; }

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr);
  gap: 20px;
  margin-top: 20px;
}
.profile-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(21,27,23,.88), rgba(12,17,14,.9));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.profile-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.profile-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.profile-panel-head span { color: var(--dim); font-size: 9px; }
.profile-chart { padding: 8px 14px 14px; }
.profile-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.profile-chart-empty { height: 190px; display: grid; place-content: center; color: var(--dim); font-size: 11px; }
.profile-chart-foot { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; padding: 0 4px; }

.phase-list { padding: 12px 18px 18px; }
.phase-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.phase-row:last-child { border-bottom: 0; }
.phase-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11px; }
.phase-row-head b { color: #d6c9b6; font-weight: 500; }
.phase-row-head span { color: var(--dim); font-family: var(--font-mono); font-size: 9px; }
.phase-track { height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.055); overflow: hidden; }
.phase-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(210,173,112,.55), var(--gold)); }
.phase-meta { margin-top: 5px; color: var(--dim); font-size: 9px; }
.phase-note { margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.7; }

.profile-recent { margin-top: 20px; }
.profile-recent-list { padding: 8px 18px 16px; }
.profile-game-row {
  display: grid;
  grid-template-columns: 90px minmax(0,1.2fr) minmax(0,1fr) 82px 58px;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.profile-game-row:last-child { border-bottom: 0; }
.profile-game-row .date { color: var(--dim); font-family: var(--font-mono); font-size: 9px; }
.profile-game-row .opponent { color: #d2c5b1; }
.profile-game-row .result { color: var(--muted); }
.profile-game-row .result.win { color: var(--jade); }
.profile-game-row .result.loss { color: #cd8c7f; }
.profile-game-row .quality { color: var(--gold); font-family: var(--font-mono); font-size: 10px; text-align: right; }
.profile-game-row .moves { color: var(--dim); font-size: 9px; text-align: right; }
.profile-empty-row { padding: 20px 0; color: var(--dim); font-size: 11px; }

.profile-method {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  background: rgba(255,255,255,.012);
}
.profile-method b { color: #cfc2ae; font-weight: 500; }
.profile-method summary { cursor: pointer; color: #cfc2ae; font-size: 11px; }
.profile-method p { margin: 10px 0 0; }
.profile-disclaimer { margin-top: 12px; color: #686c62; font-size: 9px; line-height: 1.7; }

@media (max-width: 860px) {
  .profile-page { width: min(100% - 28px, 760px); padding-top: 22px; }
  .profile-hero { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
  .rank-card { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .rank-label { font-size: 30px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3,1fr); row-gap: 0; }
  .profile-stat:nth-child(4) { padding-left: 0; border-left: 0; }
  .profile-stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .profile-game-row { grid-template-columns: 72px minmax(0,1fr) 74px 42px; }
  .profile-game-row .moves { display: none; }
  .profile-chart svg { height: 160px; }
}
@media (max-width: 520px) {
  .profile-page { width: calc(100% - 24px); }
  .profile-name { font-size: 27px; }
  .profile-rating { font-size: 35px; }
  .profile-stats { grid-template-columns: repeat(3,1fr); }
  .profile-stat:nth-child(4) { padding-left: 0; border-left: 0; }
  .profile-stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .profile-stat:nth-child(7) { grid-column: span 3; padding-left: 0; border-left: 0; }
  .profile-game-row { grid-template-columns: 64px minmax(0,1fr) 68px; gap: 8px; }
  .profile-game-row .quality { display: none; }
}
