/* Buff page styles */

#buff-main.layout--wide {
  max-width: min(96vw, 96rem);
}

.buff-table-shell {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #2f2f2f 0%, #292929 100%);
  box-shadow: var(--shadow);
}

.buff-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
}

.buff-table th,
.buff-table td {
  vertical-align: top;
  padding: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.buff-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #2b2b2b;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-align: left;
  border-bottom: 1px solid rgba(51, 255, 167, 0.26);
}

.buff-table thead th[data-class-col] {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-shadow: inherit;
}

.buff-sticky-head {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #262626 0%, #232323 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s ease;
}

.buff-sticky-head.is-visible {
  opacity: 1;
}

.buff-sticky-head .buff-table {
  margin: 0;
}

.buff-sticky-head .buff-table thead th {
  position: static;
  background: #2b2b2b;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(51, 255, 167, 0.26);
}

.buff-sticky-head .buff-table thead tr::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(51, 255, 167, 0.02), rgba(51, 255, 167, 0.24), rgba(51, 255, 167, 0.02));
}

.buff-table thead th:first-child {
  left: 0;
  z-index: 3;
}

.buff-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 10rem;
  background: #2d2d2d;
  text-align: left;
}

.buff-group-row th {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0.55rem 0.9rem;
  background: #242424;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(51, 255, 167, 0.14);
}

.buff-row__title {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
}

tr.buff-row--section-physical > th {
  border-left: 4px solid #ffb36b;
}

tr.buff-row--section-general > th {
  border-left: 4px solid #6fd0c6;
}

tr.buff-row--section-magic > th {
  border-left: 4px solid #79b7ff;
}

tr.buff-row--section-status-resist > th {
  border-left: 4px solid #84d89e;
}

tr.buff-row--section-element-resist > th {
  border-left: 4px solid #9ad67d;
}

tr.buff-row--section-support > th {
  border-left: 4px solid #f0d36d;
}

.buff-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.buff-skill-list--matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.42rem;
  align-content: start;
}

.buff-skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(51, 255, 167, 0.18);
  border-radius: 999px;
  background: rgba(51, 255, 167, 0.06);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}

.buff-skill-pill--matrix {
  justify-content: center;
  gap: 0.38rem;
  min-height: 2rem;
  min-width: 3rem;
  padding: 0.28rem 0.42rem;
  border-radius: 10px;
}

.buff-skill-pill:hover,
.buff-skill-pill:focus-visible {
  border-color: rgba(51, 255, 167, 0.32);
  background: rgba(51, 255, 167, 0.1);
  color: var(--accent);
}

/* Prophecy compare (78–79) — subsection of buff-compare */
.buff-prophecy-block {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(51, 255, 167, 0.16);
}

.buff-prophecy-basics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.buff-prophecy-basics__group {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(51, 255, 167, 0.14);
  border-radius: 12px;
  background: rgba(51, 255, 167, 0.04);
}

.buff-prophecy-basics__class {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.buff-prophecy-basics__list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.buff-prophecy-basics__skill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.45rem;
  border: 1px solid rgba(51, 255, 167, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.25;
}

.buff-prophecy-basics__skill--revelation {
  border-style: dashed;
  opacity: 0.92;
}

.buff-prophecy-basics__skill img {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.buff-prophecy-basics__name {
  flex: 1;
  font-weight: 700;
}

.buff-prophecy-basics__level {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.buff-table-shell--prophecy {
  margin-top: 0.35rem;
}

.buff-table--prophecy {
  min-width: 72rem;
}

.buff-table--prophecy th,
.buff-table--prophecy td {
  vertical-align: middle;
  text-align: center;
}

.buff-table--prophecy .buff-prophecy-corner,
.buff-table--prophecy .buff-prophecy-stat {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 9.5rem;
  text-align: left;
  background: #24352f;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.18);
}

.buff-prophecy-skill-col {
  min-width: 7.5rem;
  max-width: 8.5rem;
  padding: 0.55rem 0.35rem;
}

.buff-prophecy-skill-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  color: inherit;
  text-decoration: none;
}

.buff-prophecy-skill-head__icon {
  width: 2rem;
  height: 2rem;
}

.buff-prophecy-skill-head__name {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.buff-prophecy-skill-head__en {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
}

.buff-prophecy-skill-head__meta {
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
}

.buff-prophecy-stat {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding-right: 0.65rem;
}

.buff-prophecy-stat__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.buff-prophecy-stat__label {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.buff-prophecy-val {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.buff-prophecy-val--pos {
  color: #8ce8b8;
}

.buff-prophecy-val--neg {
  color: #ffb36b;
}

.buff-prophecy-val--empty {
  color: var(--text-muted);
  font-weight: 600;
}

.buff-prophecy-source {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.buff-prophecy-source a {
  color: var(--accent);
}

.buff-skill-pill img {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 4px;
}

.buff-skill-pill__scope {
  flex: 0 0 auto;
  min-width: 1.5rem;
  padding: 0.14rem 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: center;
}

.buff-empty {
  color: #7d7d7d;
  font-size: 0.88rem;
}

.buff-table td.is-muted,
.buff-detail-card.is-muted {
  opacity: 0.42;
}

.buff-table [data-class-col].is-strong {
  background: rgba(51, 255, 167, 0.06);
}

.buff-section-note {
  margin: -0.2rem 0 1rem;
  color: var(--text-muted);
}

.buff-notice-shell {
  padding-bottom: 0;
}

.buff-notice {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(51, 255, 167, 0.22);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(51, 255, 167, 0.08) 0%, rgba(41, 41, 41, 0.95) 100%);
}

.buff-notice__lead {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.55;
}

.buff-notice__copy {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.buff-notice__link {
  margin: 0;
}

.buff-notice__link a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.buff-notice__link a:hover,
.buff-notice__link a:focus-visible {
  text-decoration: underline;
}

.buff-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.2rem;
}

.buff-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(51, 255, 167, 0.18);
  border-radius: 999px;
  background: rgba(51, 255, 167, 0.05);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.buff-jump-nav a:hover,
.buff-jump-nav a:focus-visible {
  border-color: rgba(51, 255, 167, 0.34);
  color: var(--accent);
}

.section-heading--compact {
  margin-bottom: 0.35rem;
}

.section-heading--compact h3 {
  margin: 0;
  font-size: 1.35rem;
}

.buff-extra-block {
  margin-bottom: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.buff-extra-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.buff-extra-block__heading {
  margin-bottom: 1rem;
}

.buff-extra-category {
  margin-bottom: 1.2rem;
}

.buff-extra-category__title {
  margin: 0 0 0.65rem;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.buff-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.buff-extra-card {
  display: block;
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(170deg, var(--surface) 0%, #292929 100%);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.buff-extra-card:hover,
.buff-extra-card:focus-visible {
  border-color: rgba(51, 255, 167, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(51, 255, 167, 0.12), var(--shadow);
}

.buff-extra-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.buff-extra-card__icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.buff-extra-card__title {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.buff-extra-card__en {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.buff-extra-card__meta {
  margin: 0.45rem 0 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.buff-extra-card__effect {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.buff-extra-card__scope {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
}

.buff-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.buff-detail-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(170deg, var(--surface) 0%, #292929 100%);
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.buff-detail-card.is-clickable {
  cursor: pointer;
}

.buff-detail-card.is-clickable:hover,
.buff-detail-card.is-clickable:focus-visible {
  border-color: rgba(51, 255, 167, 0.34);
  background: linear-gradient(170deg, #313831 0%, #2b312d 100%);
  box-shadow: 0 0 0 1px rgba(51, 255, 167, 0.16), var(--shadow);
  transform: translateY(-1px);
}

.buff-detail-card.is-jump-flash {
  border-color: rgba(51, 255, 167, 0.62);
  background: linear-gradient(170deg, #334137 0%, #2d3630 100%);
  box-shadow: 0 0 0 2px rgba(51, 255, 167, 0.22), var(--shadow);
  transform: translateY(-2px);
}

.buff-detail-card__head {
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.buff-detail-card__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  flex: 0 0 auto;
}

.buff-detail-card__title {
  min-width: 0;
}

.buff-detail-card__title h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.buff-owner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.45rem;
}

.buff-owner-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(51, 255, 167, 0.08);
  border: 1px solid rgba(51, 255, 167, 0.15);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.buff-detail-card__copy {
  margin: 0.8rem 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

.buff-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.buff-detail-meta div {
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: var(--surface-muted);
}

.buff-detail-meta dt {
  margin: 0 0 0.2rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.buff-detail-meta dd {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 920px) {
  .buff-extra-grid {
    grid-template-columns: 1fr 1fr;
  }

  .buff-details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .buff-details-grid {
    grid-template-columns: 1fr;
  }

  .buff-table tbody th {
    min-width: 11rem;
  }
}

.floating-actions {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.55rem;
  z-index: 20;
}

.floating-action,
.back-to-top {
  position: fixed;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(51, 255, 167, 0.28);
  border-radius: 999px;
  background: rgba(31, 61, 50, 0.94);
  color: var(--accent);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.floating-action {
  position: static;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(46, 46, 46, 0.94);
}

.floating-action:hover,
.floating-action:focus-visible {
  color: var(--text);
  border-color: rgba(51, 255, 167, 0.3);
  background: #323232;
}

.back-to-top {
  position: static;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.4rem);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: rgba(51, 255, 167, 0.42);
  background: #2a5545;
  color: var(--accent-strong);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
