/* Library book "Quests" (pages/library/quests.php) - only the book's own bits; the rest is library.css */

/* ─────────── index: chips + table ─────────── */
.lib-frame .lib-quests-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-4px 0 12px}
.lib-frame .lib-quests-chips .lib-chip small{font-size:11px;opacity:.7;font-variant-numeric:tabular-nums}
.lib-frame .lib-quests-label{flex:none;margin-right:4px;font-family:var(--ff-head);font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-meta)}
.lib-frame table.lib-quests-table{min-width:560px}
.lib-frame table.lib-quests-table td:first-child{min-width:220px}
.lib-frame table.lib-quests-table td .lib-tag{padding:0 7px;font-size:11px;line-height:1.6;vertical-align:1px}
.lib-frame a.lib-quests-name{font-weight:700}
.lib-frame table.lib-quests-table th.num,.lib-frame table.lib-quests-table td.num{width:92px}

/* ─────────── sheet: places, notes, quest log ─────────── */
.lib-frame ul.lib-quests-places.is-many{columns:2 260px;column-gap:28px}
.lib-frame ul.lib-quests-places > li{break-inside:avoid}
.lib-frame ul.lib-quests-notes{max-width:920px}
.lib-frame .lib-quests-logs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:4px 26px;align-items:start}
.lib-frame ol.lib-quests-missions{margin:2px 0 10px;padding-left:24px;columns:2 250px;column-gap:28px}
.lib-frame ol.lib-quests-missions > li{padding:2px 0;break-inside:avoid}
.lib-frame .lib-quests-logs:has(> .lib-quests-log + .lib-quests-log) ol.lib-quests-missions{columns:1}
.lib-frame h4.lib-quests-mission{margin:10px 0 2px;font-family:var(--ff-head);font-size:13px;font-weight:700;letter-spacing:.04em;color:var(--lib-head)}
.lib-frame ol.lib-quests-steps{margin:0 0 4px;padding-left:22px;font-size:15px;line-height:1.4}
.lib-frame ol.lib-quests-steps > li{padding:1px 0}

/* ─────────── sheet: chests ─────────── */
.lib-frame .lib-quests-chests{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:10px;align-items:start}
.lib-frame .lib-panel.lib-quests-chest{margin:0;padding:9px 12px 10px;min-width:0}
.lib-frame .lib-quests-chesthead{display:flex;align-items:center;gap:9px;margin:0 0 6px}
.lib-frame .lib-quests-chesthead > div{min-width:0}
.lib-frame .lib-quests-chestname{display:block;font-family:var(--ff-head);font-size:14.5px;line-height:1.3;letter-spacing:.02em;color:var(--lib-head)}
.lib-frame .lib-quests-sub{display:block;font-size:13px;line-height:1.3;color:var(--lib-muted)}
.lib-frame p.lib-quests-chestnote{margin:0 0 7px;font-size:14px;line-height:1.4;color:var(--lib-ink)}
.lib-frame .lib-quests-chest details.lib-spoiler{margin:0}
.lib-frame ul.lib-quests-loot{list-style:none;margin:4px 0 0;padding:0}
.lib-frame ul.lib-quests-loot > li{display:flex;align-items:center;gap:8px;padding:2px 0;line-height:1.3}
.lib-frame ul.lib-quests-loot > li > .lib-sprite{flex:none}
.lib-frame ul.lib-quests-loot > li > span{min-width:0}
.lib-frame p.lib-quests-in{margin:6px 0 0;font-size:13px;color:var(--lib-meta)}
.lib-frame ol.lib-quests-pick{list-style:none;margin:2px 0 0;padding:0}
.lib-frame ol.lib-quests-pick > li{padding:6px 0 4px;border-top:1px solid var(--lib-hair)}
.lib-frame ol.lib-quests-pick > li:first-child{border-top:0;padding-top:2px}
.lib-frame .lib-quests-chestno{display:block;font-family:var(--ff-head);font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--lib-meta)}

/* ─────────── narrow sheets: the place moves under the quest name ─────────── */
.lib-frame .lib-quests-place{display:none;font-size:13px;line-height:1.3;color:var(--lib-muted)}
@container lib (max-width:620px){
  .lib-frame table.lib-quests-table{min-width:0}
  .lib-frame table.lib-quests-table td:first-child{min-width:0}
  .lib-frame table.lib-quests-table :is(th,td):nth-child(2){display:none}
  .lib-frame .lib-quests-place{display:block}
  .lib-frame table.lib-quests-table th.num,.lib-frame table.lib-quests-table td.num{width:auto;white-space:nowrap}
  .lib-frame table.lib-quests-table th{letter-spacing:.06em}
}
