/* Spellbook drops page */

/* 列宽：spellbook-drops.html → data-content-max="table"（见 guide.css） */

.layout--guide-nav .flow-nav {
  display: flex;
  flex-direction: column;
}

.layout--guide-nav .flow-nav nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0;
  scrollbar-width: none;
}

.layout--guide-nav .flow-nav nav::-webkit-scrollbar {
  display: none;
}

.spellbook-meta {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.spellbook-skill-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.spellbook-skill-link:hover,
.spellbook-skill-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.spellbook-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spellbook-toolbar {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--table-head-bg);
}

.spellbook-toolbar input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
}

.spellbook-toolbar input:focus-visible {
  outline: 2px solid rgba(51, 255, 167, 0.45);
  outline-offset: 1px;
}

.spellbook-feedback {
  min-height: 1.25rem;
  margin: 0;
  padding: 0.55rem 1rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.spellbook-class-section {
  scroll-margin-top: 1rem;
}

.spellbook-table-shell {
  overflow-x: auto;
  background: var(--surface-ink);
}

.spellbook-table {
  width: 100%;
  min-width: 76rem;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.spellbook-table col.spellbook-col-level {
  width: 4.5rem;
}

.spellbook-table col.spellbook-col-skill {
  width: 13%;
}

.spellbook-table col.spellbook-col-book {
  width: 22%;
}

.spellbook-table col.spellbook-col-mob {
  width: 20%;
}

.spellbook-table col.spellbook-col-chance {
  width: 6.5rem;
}

.spellbook-table col.spellbook-col-loc {
  width: 28%;
}

.spellbook-table th,
.spellbook-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #303030;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.spellbook-table th.spellbook-col-loc,
.spellbook-table td.spellbook-col-loc {
  min-width: 16rem;
  overflow-wrap: normal;
  word-break: normal;
}

.spellbook-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-head-bg);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 1px 0 var(--table-line);
}

.spellbook-table tbody tr {
  background: var(--table-row);
}

.spellbook-table tbody tr:nth-child(even):not(.spellbook-group-row):not(.spellbook-drop-subrow) {
  background: var(--table-row-alt);
}

.spellbook-table tbody tr.spellbook-drop-group + tr.spellbook-drop-subrow,
.spellbook-table tbody tr.spellbook-drop-subrow + tr.spellbook-drop-subrow {
  background: inherit;
}

.spellbook-table tbody tr.spellbook-drop-subrow td {
  border-top: 1px dashed #383838;
}

.spellbook-table tbody tr.spellbook-drop-group + tr.spellbook-drop-subrow td {
  border-top: 1px solid #383838;
}

.spellbook-table tbody tr.spellbook-drop-group td[rowspan] {
  border-top: none;
}

.spellbook-table tbody tr:hover:not(.spellbook-group-row) {
  background: var(--table-row-hover);
}

.spellbook-group-row {
  scroll-margin-top: 1rem;
}

.spellbook-group-row td {
  padding: 0;
  background: linear-gradient(90deg, #2a2a2a, #262626);
  border-bottom: 1px solid #383838;
  vertical-align: middle;
}

.spellbook-group-toggle {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.spellbook-group-toggle:hover,
.spellbook-group-toggle:focus-visible {
  background: rgba(51, 255, 167, 0.06);
  outline: none;
}

.spellbook-group-toggle__chevron {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.2rem;
  border-right: 1.7px solid var(--accent);
  border-bottom: 1.7px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.spellbook-group-row.is-collapsed .spellbook-group-toggle__chevron {
  transform: rotate(-45deg);
}

.spellbook-group-row__zh {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.spellbook-group-row__en {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.spellbook-drop-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(51, 255, 167, 0.28);
  border-radius: 50%;
  background: rgba(51, 255, 167, 0.08);
  color: var(--accent);
  cursor: pointer;
}

.spellbook-drop-toggle:hover,
.spellbook-drop-toggle:focus-visible {
  border-color: rgba(51, 255, 167, 0.5);
  background: rgba(51, 255, 167, 0.14);
  outline: none;
}

.spellbook-drop-toggle__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  line-height: 0;
}

.spellbook-drop-toggle__chevron {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -0.16rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}

.spellbook-drop-toggle__chevron + .spellbook-drop-toggle__chevron {
  margin-top: -0.28rem;
}

.spellbook-drop-toggle.is-expanded .spellbook-drop-toggle__icon {
  transform: rotate(180deg);
}

.spellbook-col-level {
  text-align: center;
  color: #e8e8e8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.spellbook-col-skill {
  color: #e8e8e8;
  font-weight: 600;
  vertical-align: middle;
}

.spellbook-col-chance {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.spellbook-col-chance strong {
  color: #ffd27a;
  font-weight: 800;
}

.spellbook-col-book .item-name,
.spellbook-col-mob .item-name,
.spellbook-col-skill .item-name {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: 100%;
}

.spellbook-col-book .item-name__content,
.spellbook-col-mob .item-name__content,
.spellbook-col-skill .item-name__content {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.spellbook-col-book .item-name__class-1,
.spellbook-col-mob .item-name__class-1,
.spellbook-col-skill .item-name__class-1 {
  line-height: 1.35;
  word-break: break-word;
}

.spellbook-col-book .item-name__additional,
.spellbook-col-mob .item-name__additional,
.spellbook-col-skill .item-name__additional {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.spellbook-drop-amt {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.spellbook-loc-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.spellbook-loc-cell__main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.spellbook-loc-cell__main strong {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.spellbook-loc-cell__sub {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.spellbook-loc-link {
  color: var(--link);
  text-decoration: none;
}

.spellbook-loc-link:hover,
.spellbook-loc-link:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

.spellbook-map-pin {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(51, 255, 167, 0.28);
  border-radius: 50%;
  background: rgba(51, 255, 167, 0.08);
  color: var(--accent);
  line-height: 1;
  text-decoration: none;
}

.spellbook-map-pin img {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
}

.spellbook-map-pin:hover,
.spellbook-map-pin:focus-visible {
  border-color: var(--accent);
  background: rgba(51, 255, 167, 0.14);
  outline: none;
}

@media (max-width: 900px) {
  .guide-nav-shell {
    display: block;
  }

  .flow-nav ol {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  }
}
