.ranger-list-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.ranger-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.9rem;
}

.ranger-card {
  width: 100%;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.95rem;
  text-align: left;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ranger-card:hover,
.ranger-card.active {
  background: #f8fbff;
  border-color: #bfdbfe;
}

.ranger-thumb-wrap {
  width: 78px;
  height: 78px;
  border-radius: 1.1rem;
  background: #f3f4f6;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ranger-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ranger-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.ranger-title-row h2 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.ranger-tags,
.ranger-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ranger-tags span {
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.ranger-mini-stats {
  margin-top: 0.55rem;
}

.ranger-mini-stats span {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 750;
}

.ranger-modal-panel {
  width: min(920px, 100%);
}

.ranger-detail-head {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.ranger-detail-image-wrap {
  width: 140px;
  height: 140px;
  flex: 0 0 auto;
  border-radius: 1.4rem;
  background: #f3f4f6;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ranger-detail-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.detail-tags {
  margin: 0.4rem 0 0.5rem;
}

.ranger-date {
  margin-bottom: 0;
  color: var(--muted);
}

.ranger-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.ranger-stat {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.75rem;
  background: #fbfdff;
}

.ranger-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ranger-stat strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
}

.ranger-skill-card,
.ranger-ability-card,
.ranger-talent-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  background: #fbfdff;
}

.ranger-icon-title {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ranger-icon-title h4 {
  margin-bottom: 0.15rem;
  color: var(--primary-dark);
}

.ranger-icon-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.small-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 0.8rem;
  background: #f3f4f6;
  border: 1px solid var(--line);
}

.talent-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.talent-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  color: var(--primary-dark);
}

strong.talent-title-with-icon {
  display: inline-flex;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.talent-boost-row {
  display: block !important;
  margin: 0.55rem 0;
}

.talent-boost-row .talent-boost-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  white-space: nowrap;
  font-weight: 400;
}

.talent-boost-row .talent-inline-icon {
  width: 34px;
  height: 34px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.skill-effect-table,
.skill-meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e0e7ff;
  border-radius: 0.9rem;
  background: #ffffff;
}

.skill-effect-table {
  min-width: 660px;
}

.skill-meta-table {
  min-width: 420px;
  table-layout: fixed;
}

.skill-meta-table-wrap {
  margin: 0.55rem 0 0.75rem;
}

.skill-effect-table th,
.skill-effect-table td,
.skill-meta-table th,
.skill-meta-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e0e7ff;
  border-right: 1px solid #e0e7ff;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.skill-effect-table thead th,
.skill-meta-table thead th {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
}

.skill-effect-table tbody th {
  font-weight: 900;
  color: var(--text);
  background: #fbfdff;
}

.skill-effect-table tr:last-child th,
.skill-effect-table tr:last-child td,
.skill-meta-table tr:last-child th,
.skill-meta-table tr:last-child td {
  border-bottom: 0;
}

.skill-effect-table th:last-child,
.skill-effect-table td:last-child,
.skill-meta-table th:last-child,
.skill-meta-table td:last-child {
  border-right: 0;
}

.skill-meta-table th,
.skill-meta-table td {
  width: 33.3333%;
}

.ability-effect-list,
.talent-effect-list {
  display: grid;
  gap: 0.55rem;
}

.ability-effect,
.talent-effect {
  border: 1px solid #e0e7ff;
  border-radius: 0.85rem;
  padding: 0.75rem;
  background: #ffffff;
}

.ability-effect strong,
.talent-effect-list strong {
  display: block;
  margin-bottom: 0.45rem;
}

.ranger-ability-list,
.ranger-talent-list {
  display: grid;
  gap: 0.55rem;
}

.ranger-ability-card .preline,
.ranger-skill-description,
.ranger-talent-description,
.ranger-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-line;
}

.ranger-skill-description,
.ranger-talent-description,
.ranger-description {
  margin-top: 0.35rem;
}

.ranger-talent-card h4 {
  margin-bottom: 0.65rem;
  color: var(--primary-dark);
}

.talent-section {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}

.talent-section h5 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--text);
}

.talent-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.talent-main-table,
.talent-main-effect-table,
.talent-boost-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid #e0e7ff;
  border-radius: 0.9rem;
  background: #ffffff;
}

.talent-main-table-wrap,
.talent-main-effect-wrap,
.talent-boost-table-wrap {
  margin-top: 0.45rem;
}

.talent-main-table,
.talent-main-effect-table {
  min-width: 520px;
}

.talent-main-condition-col {
  width: 80%;
}

.talent-main-prob-col {
  width: 20%;
}

.talent-main-table th,
.talent-main-table td,
.talent-main-effect-table th,
.talent-main-effect-table td,
.talent-boost-table td {
  padding: 0.65rem 0.75rem;
  border-right: 1px solid #e0e7ff;
  border-bottom: 1px solid #e0e7ff;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.talent-main-table th,
.talent-main-effect-table th {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
}

.talent-main-table td[rowspan],
.talent-main-effect-table td[rowspan],
.talent-prob-cell {
  vertical-align: middle;
  font-weight: 400;
  font-size: 1rem;
}

.talent-main-table tr:last-child td,
.talent-main-effect-table tr:last-child td,
.talent-boost-table tr:last-child td {
  border-bottom: 0;
}

.talent-main-table th:last-child,
.talent-main-table td:last-child,
.talent-main-effect-table th:last-child,
.talent-main-effect-table td:last-child,
.talent-boost-table td:last-child {
  border-right: 0;
}

.talent-boost-table {
  min-width: 620px;
}

.talent-boost-table td {
  width: 33.3333%;
  text-align: center;
}

.talent-boost-icon-row td {
  vertical-align: middle;
  padding-bottom: 0.35rem;
  background: #eef2ff;
}

.talent-boost-text-row td {
  vertical-align: top;
  padding-top: 0.35rem;
  font-weight: 400;
}

.talent-boost-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 400;
}

@media (max-width: 620px) {
  .ranger-list {
    grid-template-columns: 1fr;
  }

  .ranger-card {
    grid-template-columns: 70px 1fr;
  }

  .ranger-thumb-wrap {
    width: 64px;
    height: 64px;
  }

  .ranger-title-row {
    align-items: flex-start;
  }

  .ranger-detail-head {
    align-items: flex-start;
  }

  .ranger-detail-image-wrap {
    width: 96px;
    height: 96px;
  }

  .ranger-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .talent-boost-row .talent-boost-value {
    white-space: normal;
  }

  .talent-main-table,
  .talent-main-effect-table,
  .talent-boost-table {
    min-width: 560px;
  }
}
