.hero-mobile-modal-scroll {
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100dvh;
  padding: calc(56px + env(safe-area-inset-top)) 7px calc(14px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.hero-detail-shell {
  width: min(100%, 600px);
  margin: 0 auto;
  color: #2f2f2f;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hero-detail-board {
  background: #f5f5f5;
  border: 1px solid #787878;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  padding: 5px;
}
.hero-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: auto;
  min-width: 54px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 5px;
  background: rgba(0,0,0,.58);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-detail-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-bottom: 5px;
}
.hero-stat-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.hero-stat-pair .hero-info-table + .hero-info-table { border-left: 0; }
.hero-stat-pair .hero-stat-grid {
  grid-template-columns: minmax(0, 1fr) minmax(64px, .62fr);
}
.hero-stat-pair .hero-info-label,
.hero-stat-pair .hero-info-value {
  padding-left: 5px;
  padding-right: 5px;
}
.hero-stat-pair .hero-info-title {
  font-size: 13px;
}
.hero-profile-card {
  display: flex;
  align-items: center;
  min-height: 76px;
  background: #414141;
  border: 1px solid #5d5d5d;
  padding: 6px 62px 6px 6px;
}
.hero-profile-thumb {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  background: #fff;
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-profile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-profile-icons {
  width: 28px;
  flex: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 6px;
}
.hero-profile-icons img { width: 21px; height: 21px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.hero-profile-name { min-width: 0; color: #fff; font-size: 19px; line-height: 1.15; font-weight: 900; word-break: keep-all; }
.hero-profile-meta { margin-top: 5px; color: #dedede; font-size: 11px; line-height: 1.35; font-weight: 700; }
.hero-info-table { border: 1px solid #585858; background: #e8e8e8; min-height: 0; display: flex; flex-direction: column; }
.hero-info-title, .hero-skill-title { background: #393939; color: #fff; font-weight: 900; text-align: center; }
.hero-info-title { height: 25px; line-height: 25px; font-size: 14px; }
.hero-info-grid { display: grid; grid-template-columns: 1fr 1fr; flex: 1; grid-auto-rows: 1fr; }
.hero-summary-grid { grid-template-rows: repeat(3, minmax(0,1fr)); }
.hero-stat-grid { grid-template-columns: minmax(140px,1.25fr) minmax(82px,.75fr); grid-template-rows: repeat(2,minmax(0,1fr)); }
.hero-info-label, .hero-info-value { min-height: 25px; border-top: 1px solid #646464; display: flex; align-items: center; padding: 2px 7px; font-size: 12px; font-weight: 800; }
.hero-info-label { background: #666; color: #fff; gap: 7px; }
.hero-info-label span:last-child { white-space: nowrap; }
.hero-info-value { background: #efefef; color: #262626; justify-content: center; text-align: center; }
.hero-info-value.is-rarity { background: #ffbc86; }
.hero-stat-mark { width: 19px; height: 19px; flex: 0 0 19px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #555; font-size: 8px; font-weight: 900; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.hero-skill-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.hero-skill-panel { border: 1px solid #696969; background: #ededed; }
.hero-skill-title { height: 26px; line-height: 26px; font-size: 14px; border-bottom: 1px solid #696969; }
.hero-skill-row { display: grid; grid-template-columns: 70px minmax(0,1fr); min-height: 86px; border-bottom: 1px solid #7a7a7a; }
.hero-skill-row:last-child { border-bottom: 0; }
.hero-skill-icon-cell { background: #dbe5ee; border-right: 1px solid #7a7a7a; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 4px; text-align: center; }
.hero-skill-icon { width: 46px; height: 46px; border-radius: 9px; background: #404040; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-skill-icon img { width: 100%; height: 100%; object-fit: cover; }
.hero-skill-icon-fallback { display: none; color: #fff; font-size: 12px; font-weight: 900; }
.hero-skill-name { margin-top: 4px; color: #1e1e1e; font-size: 11px; line-height: 1.2; font-weight: 900; word-break: keep-all; }
.hero-skill-desc { position: relative; background: #f7f7f7; padding: 8px 9px; color: #292929; font-size: 12.5px; line-height: 1.38; font-weight: 600; overflow: hidden; }
.hero-skill-desc::after { content: ""; position: absolute; right: 22px; bottom: 18px; width: 118px; height: 118px; background: rgba(0,0,0,.035); transform: rotate(-28deg); pointer-events: none; }
.hero-weapon-section, .hero-trait-section { margin-top: 6px; }
.hero-weapon-section.hidden, .hero-trait-section.hidden { display: none; }
.hero-trait-grid .hero-skill-row { min-height: 82px; border-bottom: 0; }
.hero-weapon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-weapon-grid .hero-skill-row { min-height: 82px; border-bottom: 0; }
.hero-weapon-grid .hero-skill-row + .hero-skill-row { border-left: 1px solid #7a7a7a; }
.hero-weapon-grid .hero-skill-row { grid-template-columns: 62px minmax(0, 1fr); }
.hero-weapon-grid .hero-skill-icon { width: 42px; height: 42px; }
.hero-weapon-grid .hero-skill-desc { padding: 7px; font-size: 11.5px; line-height: 1.34; }
@media (max-width: 380px) {
  .hero-mobile-modal-scroll { padding-left: 5px; padding-right: 5px; }
  .hero-profile-thumb { width: 58px; height: 58px; flex-basis: 58px; }
  .hero-profile-name { font-size: 18px; }
  .hero-skill-row { grid-template-columns: 66px minmax(0,1fr); }
}
