
.zzz-monster-page {
  background-color: var(--preset-color-background, #fff4eb);
}
.zzz-monster-page > section:not(.zzz-monster-hero) {
  padding: 32px 0;
}
.zzz-monster-page > section:not(.zzz-monster-hero) + section {
  padding-top: 0;
}

.zzz-monster-hero {
  padding: 24px 0 56px;
  background: linear-gradient(135deg, #2d323d 0%, #3c424f 55%, #4a5161 100%);
  color: #f5f7fa;
  position: relative;
  overflow: hidden;
}
.zzz-monster-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 40%, rgba(245, 194, 66, 0.05), transparent);
  pointer-events: none;
}
.zzz-monster-hero__breadcrumb {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}
.zzz-monster-hero__breadcrumb .zzz-breadcrumb { color: rgba(255,255,255,0.7); font-size: 13px; }
.zzz-monster-hero__breadcrumb .zzz-breadcrumb a { color: rgba(255,255,255,0.85); }
.zzz-monster-hero__breadcrumb .zzz-breadcrumb a:hover { color: #fff; }

.zzz-monster-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 820px) {
  .zzz-monster-hero__inner { grid-template-columns: minmax(320px, 480px) 1fr; }
}
.zzz-monster-hero__image {
  position: relative;
  aspect-ratio: 1;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
}
.zzz-monster-hero__image img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 819px) {
  .zzz-monster-hero__image { max-width: 320px; margin: 0 auto; }
}

.zzz-monster-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.zzz-monster-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.zzz-monster-badge--rank-s { background: linear-gradient(135deg, #f5c242, #e89a24); color: #1a1a2e; border-color: transparent; }
.zzz-monster-badge--rank-a { background: linear-gradient(135deg, #a466e0, #7d3fc8); color: #fff; border-color: transparent; }
.zzz-monster-badge--rank-b { background: linear-gradient(135deg, #4fa3e0, #2e7ec9); color: #fff; border-color: transparent; }
.zzz-monster-badge--rank-c { background: rgba(180, 185, 195, 0.25); color: #e0e4ec; }
.zzz-monster-badge--group { background: rgba(255, 255, 255, 0.1); color: #f5f7fa; border-color: rgba(255, 255, 255, 0.15); }

.zzz-monster-hero__title {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 4px;
  font-weight: 900;
  color: #f5f7fa;
  line-height: 1.2;
  letter-spacing: 0.01em;
  font-family: var(--heading-font, inherit);
}
.zzz-monster-hero__name-en {
  font-size: 14px; color: #a8b0bf; margin: 0 0 18px;
  letter-spacing: 0.08em; font-weight: 500;
}

.zzz-monster-hero__quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px 22px;
  margin: 0 0 22px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.zzz-monster-hero__quick-stats > div { display: flex; flex-direction: column; gap: 2px; }
.zzz-monster-hero__quick-stats dt {
  font-size: 11px; color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em; margin: 0; font-weight: 500;
}
.zzz-monster-hero__quick-stats dd {
  font-size: 20px; color: #fff; font-weight: 700;
  font-variant-numeric: tabular-nums; margin: 0; line-height: 1.2;
}
@media (max-width: 640px) {
  .zzz-monster-hero__quick-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px; padding: 14px 16px;
  }
  .zzz-monster-hero__quick-stats dd { font-size: 18px; }
}

.zzz-monster-hero__desc {
  font-size: 14px; line-height: 1.85;
  color: #d5dae5; white-space: pre-line; max-width: 65em;
}

.zzz-monster-combat__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 40px;
  align-items: start;
}
@media (min-width: 900px) {
  .zzz-monster-combat__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}
.zzz-monster-combat__col { min-width: 0; }
.zzz-monster-combat__col > .zzz-monster-section__title { margin-top: 0; }
.zzz-monster-variant-switch--shared { margin-bottom: 20px; }

.zzz-monster-section__title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 20px;
  padding: 6px 0 6px 14px;
  border-left: 4px solid var(--preset-color-accent, #f58828);
  color: #1a1a2e;
  line-height: 1.3;
  font-family: var(--heading-font, inherit);
}

.zzz-monster-variant-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.zzz-monster-variant-btn {
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #c5ccd6);
  color: #3a4050;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}
.zzz-monster-variant-btn:hover { border-color: var(--preset-color-accent, #f58828); }
.zzz-monster-variant-btn.is-active {
  background: var(--preset-color-dark, #1a1a2e);
  color: #fff;
  border-color: var(--preset-color-dark, #1a1a2e);
}

.zzz-monster-elements__table { display: none; overflow-x: auto; }
.zzz-monster-elements__table.is-active { display: block; }
.zzz-monster-element-matrix {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg, #fff);
  border: 2px solid var(--card-border, #c5ccd6);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 2px 10px rgba(26, 26, 46, 0.05);
}
.zzz-monster-element-matrix th,
.zzz-monster-element-matrix td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--card-border, #c5ccd6);
  font-size: 14px;
  color: #2a2f3e;
}
.zzz-monster-element-matrix thead th {
  background: var(--preset-color-dark, #2e2e33);
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--card-border, #c5ccd6);
}
.zzz-monster-element-matrix tbody th {
  text-align: center;
  font-weight: 600;
  background: var(--preset-color-dark, #2e2e33);
  color: #fff;
}
.zzz-monster-element-matrix tbody tr:last-child th,
.zzz-monster-element-matrix tbody tr:last-child td { border-bottom: 0; }
.zzz-monster-element-matrix .zzz-element-tag {
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
  color: #fff;
}
.zzz-monster-element-matrix .zzz-element-tag__icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
.zzz-monster-element-matrix .zzz-element-tag__name {
  font-size: 0.9em;
}
.zzz-monster-element-matrix td.is-weak   { color: #d73b3b; font-weight: 700; background: rgba(215, 59, 59, 0.08); }
.zzz-monster-element-matrix td.is-resist { color: #1a73c0; font-weight: 700; background: rgba(26, 115, 192, 0.08); }
.zzz-monster-element-matrix td.is-neutral { color: #6b7280; }
@media (max-width: 480px) {
  .zzz-monster-element-matrix { min-width: 420px; }
}

.zzz-monster-stats__table { display: none; }
.zzz-monster-stats__table.is-active { display: block; }
.zzz-monster-stat-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg, #fff);
  border: 2px solid var(--card-border, #c5ccd6);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(26, 26, 46, 0.05);
}
.zzz-monster-stat-table th,
.zzz-monster-stat-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--card-border, #c5ccd6);
  font-size: 14px;
}
.zzz-monster-stat-table tbody tr:last-child th,
.zzz-monster-stat-table tbody tr:last-child td { border-bottom: 0; }
.zzz-monster-stat-table th {
  text-align: left;
  color: #fff;
  font-weight: 600;
  width: 50%;
  background: var(--preset-color-dark, #2e2e33);
}
.zzz-monster-stat-table td {
  text-align: right;
  color: #1a1a2e;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.zzz-monster-description__block,
.zzz-monster-quote {
  margin: 0 0 32px;
  padding: 20px 24px;
  background: var(--card-bg, #fcfcfe);
  border: 1px solid var(--card-border, #c5ccd6);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(26, 26, 46, 0.05);
  color: #2a2f3e;
}
.zzz-monster-description__block {
  line-height: 1.9;
}
.zzz-monster-quote {
  font-style: italic;
  opacity: 0.85;
}
.zzz-monster-obtain {
  margin: 20px 0 0;
  font-size: 13px;
  color: #4a5060;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--preset-color-accent, #f58828) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--preset-color-accent, #f58828) 30%, transparent);
  border-radius: 8px;
}
.zzz-monster-obtain strong {
  color: #1a1a2e;
  font-weight: 700;
  margin-right: 8px;
}


[data-template="enemy-card"] .zzz-filter__results.zzz-grid {
  --grid-min: 260px;
  gap: 0.75rem;
}

.zzz-filter-card--enemy {
  display: block;
  padding: 0.625rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #e0e0e0);
  border-radius: var(--radius-md, 8px);
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
}
.zzz-filter-card--enemy:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: var(--preset-color-accent, #f58828);
}
.zzz-filter-card--enemy .zzz-filter-card__header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.zzz-filter-card__icon--enemy {
  width: 72px !important;
  height: 72px !important;
  background: linear-gradient(135deg, #2d323d 0%, #3c424f 100%);
  border-radius: 6px;
}
.zzz-filter-card__icon--enemy img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zzz-filter-card--enemy .zzz-filter-card__title {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 700;
  color: #1a1a2e;
  display: block;
  line-height: 1.3;
}
.zzz-filter-card--enemy .zzz-filter-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.75rem;
}

.zzz-filter-card__rank--s {
  background: linear-gradient(135deg, #f5c242, #e89a24);
  color: #1a1a2e;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.zzz-filter-card__rank--a {
  background: linear-gradient(135deg, #a466e0, #7d3fc8);
  color: #fff;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.zzz-filter-card__rank--b {
  background: linear-gradient(135deg, #4fa3e0, #2e7ec9);
  color: #fff;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.zzz-filter-card__rank--c {
  background: #c5ccd6;
  color: #2a2f3e;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.zzz-filter-card--enemy .zzz-filter-card__attr {
  color: #6b7280;
  opacity: 0.7;
  font-size: 0.72rem;
}

@media (max-width: 600px) {
  [data-template="enemy-card"] .zzz-filter__results.zzz-grid {
    --grid-min: 160px;
    gap: 0.5rem;
  }
  .zzz-filter-card--enemy {
    padding: 0.5rem;
  }
  .zzz-filter-card__icon--enemy {
    width: 56px !important;
    height: 56px !important;
  }
  .zzz-filter-card--enemy .zzz-filter-card__title {
    font-size: 0.82rem;
  }
}

.zzz-monster-element-matrix__weak { font-size: 13px; }
.zzz-monster-element-matrix td.zzz-monster-element-matrix__weak.is-weak   { background: rgba(215, 59, 59, .12); }
.zzz-monster-element-matrix td.zzz-monster-element-matrix__weak.is-resist { background: rgba(26, 115, 192, .12); }
.zzz-monster-stats__sub { font-size: 14px; font-weight: 700; color: #3a4050; margin: 0 0 8px; }
.zzz-monster-stats__group { margin-top: 12px; border: 1px solid var(--card-border, #c5ccd6); border-radius: 10px; background: var(--card-bg, #fff); overflow: hidden; }
.zzz-monster-stats__group > summary {
  cursor: pointer; list-style: none; padding: 10px 14px; font-size: 14px; font-weight: 700; color: #3a4050;
  display: flex; align-items: center; gap: 8px; user-select: none;
}
.zzz-monster-stats__group > summary::-webkit-details-marker { display: none; }
.zzz-monster-stats__group > summary::before { content: '▸'; font-size: 12px; color: var(--preset-color-accent, #f58828); transition: transform .15s; }
.zzz-monster-stats__group[open] > summary::before { transform: rotate(90deg); }
.zzz-monster-stats__count { margin-left: auto; font-size: 11px; font-weight: 600; color: #6b7280; }
.zzz-monster-stats__group .zzz-monster-stat-table { border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--card-border, #c5ccd6); }
.zzz-monster-stat-table--dense th, .zzz-monster-stat-table--dense td { padding: 8px 14px; font-size: 13px; }
.zzz-monster-stat-table--dense th { width: 58%; font-weight: 500; }
.zzz-monster-stats__unit { margin-left: 6px; font-size: 10px; color: #9aa1ad; border: 1px solid #d7dbe2; border-radius: 4px; padding: 1px 4px; vertical-align: middle; }
.zzz-monster-growth__scroll { max-height: 360px; overflow: auto; border-top: 1px solid var(--card-border, #c5ccd6); }
.zzz-monster-growth__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.zzz-monster-growth__table thead th { position: sticky; top: 0; background: var(--preset-color-dark, #2e2e33); color: #fff; font-weight: 600; padding: 8px 12px; text-align: right; }
.zzz-monster-growth__table thead th:first-child { text-align: left; }
.zzz-monster-growth__table tbody th { text-align: left; font-weight: 600; color: #3a4050; padding: 6px 12px; border-bottom: 1px solid var(--card-border, #e2e6ec); }
.zzz-monster-growth__table tbody td { text-align: right; padding: 6px 12px; border-bottom: 1px solid var(--card-border, #e2e6ec); font-variant-numeric: tabular-nums; }
.zzz-monster-growth__table tbody tr.is-key th, .zzz-monster-growth__table tbody tr.is-key td { background: rgba(245, 136, 40, .10); font-weight: 700; }
.zzz-monster-element-matrix__threshold { font-variant-numeric: tabular-nums; color: #3a4050; }
