/* ════════════════════════════════════════════
   角色狀態頁（sv-*）
   ════════════════════════════════════════════ */
.sv-page {
  padding: var(--gap-sm) 0 80px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── 英雄區 ── */
.sv-hero {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-md);
  padding: var(--gap-md);
  background: linear-gradient(135deg, var(--c-surface), var(--c-surface2));
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  margin-bottom: var(--gap-sm);
}

.sv-avatar-ring {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--c-gold-dim);
  overflow: hidden;
  background: var(--c-surface3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sv-hero-info {
  flex: 1;
  min-width: 0;
}

.sv-name {
  font-size: 1.05em;
  font-weight: bold;
  color: var(--c-gold-light);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.sv-badge {
  font-size: 0.68em;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}

.sv-badge--lv  { background: rgba(50,30,80,.8); color: #c090ff; border: 1px solid rgba(100,50,160,.5); }
.sv-badge--job { background: rgba(10,30,60,.8);  color: #80b0ff; border: 1px solid rgba(20,60,120,.5); }
.sv-badge--sex { background: rgba(60,20,20,.8);  color: #ff9090; border: 1px solid rgba(120,40,40,.5); }

.sv-record {
  font-size: 0.75em;
  color: var(--c-text-dim);
}

/* ── HP / EXP 條 ── */
.sv-vitals {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--gap-sm) var(--gap-md);
  margin-bottom: var(--gap-sm);
}

.sv-bar-row {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin-bottom: 4px;
}

.sv-bar-row:last-child { margin-bottom: 0; }

.sv-bar-lbl {
  font-size: 0.65em;
  color: var(--c-text-dim);
  width: 28px;
  flex-shrink: 0;
}

.sv-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--c-surface3);
  overflow: hidden;
}

.sv-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.sv-bar--hp .sv-bar-fill  { background: linear-gradient(90deg, var(--c-hp-from), var(--c-hp-to)); }
.sv-bar--exp .sv-bar-fill { background: linear-gradient(90deg, var(--c-exp-from), var(--c-exp-to)); }

.sv-bar-val {
  font-size: 0.6em;
  color: var(--c-text-dim);
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-exp-boost {
  font-size: 0.68em;
  color: #a080e0;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--c-border);
}
.sv-exp-boost--none {
  color: var(--c-text-faint);
}

/* ── 資源格 ── */
.sv-res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: var(--gap-sm);
}

.sv-res-cell {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sv-res-lbl {
  font-size: 0.6em;
  color: var(--c-text-faint);
}

.sv-res-val {
  font-size: 0.78em;
  color: var(--c-gold);
  font-weight: bold;
  word-break: break-all;
}

/* ── 通用 section ── */
.sv-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: var(--gap-sm);
  overflow: hidden;
}

.sv-section-hd {
  font-size: 0.72em;
  color: var(--c-gold);
  font-weight: bold;
  padding: 6px var(--gap-md);
  background: var(--c-surface2);
  border-bottom: 1px solid var(--c-border);
  letter-spacing: 0.4px;
}

/* section header with right-aligned action button (e.g. 更改狀態) */
.sv-section-hd--with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sv-edit-btn {
  background: rgba(200,160,60,0.12);
  border: 1px solid var(--c-gold-dim);
  color: var(--c-gold);
  font-size: 0.92em;
  font-family: var(--font);
  padding: 2px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: normal;
  letter-spacing: 0;
  transition: background var(--t-fast);
}
.sv-edit-btn:hover,
.sv-edit-btn:active {
  background: rgba(200,160,60,0.25);
}

/* ── 基礎屬性 ── */
.sv-base-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--c-border);
}

.sv-stat {
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  gap: 2px;
}

.sv-stat-lbl {
  font-size: 0.6em;
  color: var(--c-text-faint);
}

.sv-stat-val {
  font-size: 0.8em;
  color: var(--c-text);
  font-weight: bold;
}

/* ── 戰鬥數值 ── */
.sv-combat-grid {
  padding: var(--gap-sm) var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sv-cstat {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.sv-cs-lbl {
  font-size: 0.65em;
  color: var(--c-text-dim);
  width: 28px;
  flex-shrink: 0;
}

.sv-cbar {
  flex: 1;
  height: 7px;
  background: var(--c-surface3);
  border-radius: 4px;
  overflow: hidden;
}

.sv-cbar-fill {
  height: 100%;
  border-radius: 4px;
}

.sv-at  { background: linear-gradient(90deg, #5a0000, #c03030); }
.sv-df  { background: linear-gradient(90deg, #003050, #3080b0); }
.sv-mat { background: linear-gradient(90deg, #280060, #8030c0); }
.sv-mdf { background: linear-gradient(90deg, #003020, #30a060); }
.sv-agl { background: linear-gradient(90deg, #5a4500, #d8b030); }

.sv-cs-val {
  font-size: 0.72em;
  color: var(--c-text);
  width: 72px;
  text-align: right;
  flex-shrink: 0;
}

/* ── 裝備格 ── */
.sv-eq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-border);
}

.sv-eq-slot {
  background: var(--c-surface);
  padding: 6px var(--gap-sm);
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.sv-eq-type {
  font-size: 0.6em;
  color: var(--c-text-faint);
  width: 30px;
  flex-shrink: 0;
}

.sv-eq-name {
  font-size: 0.73em;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 可點裝備格（顯示能力 modal）+ 套裝名 button */
.sv-eq-slot--clickable {
  cursor: pointer;
  transition: background 0.15s;
}
.sv-eq-slot--clickable:active {
  background: var(--c-surface2);
}
.sv-suit-link {
  background: none;
  border: 0;
  padding: 0 4px;
  color: var(--c-gold);
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
}
.sv-suit-link:active { opacity: 0.7; }

/* 裝備資訊 / 套裝資訊 modal */
.sv-eq-info-head {
  font-size: 1em;
  color: var(--c-gold);
  text-align: center;
  padding: 8px 10px;
  background: var(--c-surface2);
  border-radius: 6px;
  margin-bottom: 8px;
}
.sv-eq-info-type {
  font-size: 0.75em;
  color: var(--c-text-faint);
  margin-left: 6px;
}
.sv-eq-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 6px 0;
}
.sv-eq-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--c-surface);
  border-radius: 4px;
  font-size: 0.8em;
}
.sv-eq-info-row > span {
  color: var(--c-text-dim);
}
.sv-eq-info-row > b {
  color: var(--c-text);
  font-weight: normal;
}
.sv-eq-info-req .sv-eq-info-row > span {
  color: var(--c-text-faint);
}
.sv-eq-bound {
  text-align: center;
  padding: 6px;
  background: rgba(100, 100, 100, 0.2);
  border: 1px solid rgba(150, 150, 150, 0.3);
  border-radius: 4px;
  color: #aaa;
  font-size: 0.8em;
  margin-top: 6px;
}

/* ── 角色資料 info rows ── */
.sv-info-grid {
  display: flex;
  flex-direction: column;
}

.sv-info-row {
  display: flex;
  align-items: baseline;
  gap: var(--gap-sm);
  padding: 5px var(--gap-md);
  border-bottom: 1px solid var(--c-border);
  font-size: 0.82em;
}

.sv-info-row:last-child {
  border-bottom: none;
}

.sv-info-lbl {
  color: var(--c-text-faint);
  font-size: 0.85em;
  width: 56px;
  flex-shrink: 0;
}

.sv-info-val {
  color: var(--c-text);
  flex: 1;
  word-break: break-word;
}

/* ── 個人狀態 ── */
.sv-pstatus {
  padding: var(--gap-sm) var(--gap-md);
  font-size: 0.8em;
  color: var(--c-text-dim);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

