.lib-head { padding-top: 70px; padding-bottom: 30px; }
.lib-head h1 { font-size: clamp(44px, 7vw, 96px); line-height: .98; max-width: 14ch; margin-top: 10px; }
.lib-head .lede { max-width: 560px; margin-top: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 34px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 8px 16px; font-family: var(--sans); font-size: 13px; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.count { margin-left: auto; font-size: 13px; color: var(--muted); }

.era { padding: 56px 0 10px; border-top: 1px solid var(--line); margin-top: 30px; scroll-margin-top: 80px; }
.era-h { display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: baseline; margin-bottom: 26px; }
.era-h .rn { font-family: var(--serif); font-size: 46px; color: var(--muted); line-height: 1; }
.era-h h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; }
.era-h h2 em { font-size: .55em; margin-left: 10px; }
.era-h p { grid-column: 2; margin: 6px 0 0; color: var(--ink-2); max-width: 620px; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tile {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; min-height: 150px; font-family: var(--sans); color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -30px rgba(34, 26, 18, .55); border-color: rgba(34, 26, 18, .3); }
.tile .no { font-family: var(--serif); font-size: 13px; color: var(--muted); letter-spacing: .12em; }
.tile h3 { font-size: 21px; line-height: 1.12; flex: 1; }
.tile .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.tile .dots { display: inline-flex; gap: 3px; align-items: center; }
.tile .dots i { width: 6px; height: 6px; border: 1px solid var(--ink-2); transform: rotate(45deg); }
.tile .dots i.f { background: var(--ink-2); }
.tile[hidden] { display: none; }

.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sheet[hidden] { display: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(34, 26, 18, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-body { position: relative; width: min(1100px, 100%); max-height: calc(100svh - 48px); overflow: auto; background: var(--paper); border-radius: 22px; box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .6); }
.sheet-nav { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 12px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(6px); }
.sheet-nav span { margin-right: auto; padding-left: 10px; font-size: 13px; color: var(--muted); }
.icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 18px; color: var(--ink); }
#slot { padding: 0 18px 18px; }
.pcard.big { display: grid; grid-template-columns: 1.25fr 1fr; box-shadow: none; }
.pcard.big .bar { grid-column: 1 / -1; }
.pcard.big .model { aspect-ratio: auto; min-height: 460px; border-bottom: 0; border-right: 1px solid var(--line); }
.pcard.big .body { padding: 26px 26px 26px; display: flex; flex-direction: column; }
.pcard.big h3 { font-size: 34px; }
.stake { margin-top: auto; padding-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stake .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.stake .sub { width: 100%; font-size: 13px; color: var(--muted); }

@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .era-h { grid-template-columns: 1fr; gap: 4px; }
  .era-h p { grid-column: 1; }
  .pcard.big { grid-template-columns: 1fr; }
  .pcard.big .model { min-height: 0; aspect-ratio: 1 / .85; border-right: 0; border-bottom: 1px solid var(--line); }
  .sheet { padding: 0; align-items: stretch; }
  .sheet-body { max-height: 100svh; border-radius: 0; }
  #slot { padding: 0 0 10px; }
  .pcard.big { border-radius: 0; border-left: 0; border-right: 0; }
  .count { width: 100%; margin: 6px 0 0; }
}
