/* Detail pages under /database/<kind>/<slug>.html (built by scripts/build-detail-pages.ps1). */
.breadcrumbs { margin: 1rem 0 .4rem; }
.breadcrumbs a { color: inherit; }
.detail-hero { display: flex; align-items: center; gap: 1.2rem; }
.detail-icon { flex: none; width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 3px 4px #0008); }
.detail-quote { font-style: italic; }
.field-photo { margin: 1rem 0; padding: .6rem; }
.field-photo img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: .55rem; }
.field-photo figcaption { margin-top: .45rem; }
.detail-body { margin-top: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem 1.2rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: .15rem 0 0; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--text); font-size: .9rem; text-decoration: none; }
.chip:hover { border-color: var(--gold); }
.chip .ico { width: 28px; height: 28px; margin: 0; vertical-align: middle; }
.detail-source { margin-top: .5rem; }
.ability-list li + li { margin-top: .55rem; }
/* Questlines on quest-giver pages */
.quest-group { margin-top: .7rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--background); }
.quest-group > summary { padding: .7rem .9rem; font-weight: 700; cursor: pointer; }
.quest-group > summary .metadata { margin-left: .4rem; font-weight: 500; }
.quest-group[open] > summary { border-bottom: 1px solid var(--line); }
.quest-group > p { margin: .6rem .9rem 0; }
.quest-group .table-scroll { margin: .6rem; }
.quest-table { width: 100%; min-width: 34rem; font-size: .88rem; }
.quest-table th, .quest-table td { vertical-align: top; }
.quest-table th[scope="row"] { font-weight: 650; text-align: start; }
.quest-table td:first-child:not(:only-child) { color: var(--muted); font-variant-numeric: tabular-nums; }
.quest-table ul { margin: 0; padding-left: 1.05rem; }
.quest-table li + li { margin-top: .12rem; }
.quest-table td, .quest-table li { font-variant-numeric: tabular-nums; }
.quest-milestone, .quest-chance, .quest-types { min-width: 22rem; }
.quest-note, .quest-flag-note { display: block; margin-top: .25rem; color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.35; }
.quest-flag { display: inline-block; margin-top: .3rem; padding: .05rem .45rem; color: #fca5a5; border: 1px solid #f8717188; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.quest-table tr.is-unverified { background: #f8717110; }
.quest-table th, .quest-table td, .quest-table li { text-align: start; }
/* Phones: each quest becomes a small card instead of a wide table row. */
@media (max-width: 600px) {
  .quest-group .table-scroll { margin: .2rem .5rem .5rem; overflow: visible; }
  .quest-table, .quest-milestone, .quest-chance, .quest-types { min-width: 0; font-size: .84rem; }
  .quest-table thead { display: none; }
  .quest-table, .quest-table tbody { display: block; }
  .quest-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .55rem; padding: .65rem .2rem; border-bottom: 1px solid var(--line); }
  .quest-table tr:last-child { border-bottom: 0; }
  .quest-table th, .quest-table td { display: block; padding: 0; border: 0; }
  .quest-quests td:nth-child(3), .quest-quests td:nth-child(4) { grid-column: 1 / -1; }
  .quest-quests td:nth-child(3)::before { content: "What to do"; }
  .quest-quests td:nth-child(4)::before { content: "Reward"; }
  .quest-quests td:nth-child(3)::before, .quest-quests td:nth-child(4)::before { display: block; margin-bottom: .1rem; color: var(--gold-light); font-size: .72rem; font-weight: 700; }
  .quest-types td, .quest-milestone td { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .detail-hero { align-items: flex-start; }
  .detail-icon { width: 56px; height: 56px; }
}
