/* 3D 實驗庫: the shelf page. Same night as the videos page; each subject brings one colour (--c) for its shelf line, code and tags. */
.library, .library * { font-family: var(--body); }
.library h1, .library h2, .lcard strong, .soon strong { font-family: var(--serif); }
.library { background: #111A21; padding: 120px 0 110px; min-height: 100vh; }

.lhero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.library .eyebrow { color: var(--gold); letter-spacing: 0.12em; font-size: 15px; margin-bottom: 10px; }
.library .eyebrow::before { background: var(--gold); }
.library h1 { font-size: clamp(34px, 9vw, 64px); margin-bottom: 16px; }
.library .lead { color: #D5DEE4; max-width: 34em; }
.lbear { flex: none; width: 96px; height: auto; }

.lfilter { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.lfilter button { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--sub); background: #18232D; border: 0; border-radius: 14px; padding: 7px 16px; cursor: pointer; }
.lfilter button i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.lfilter button span { color: var(--faint); font-size: 13px; }
.lfilter button:hover { color: var(--text); }
.lfilter button.on { color: #0E1528; background: #F1F7FB; }
.lfilter button.on span { color: #0E1528; opacity: 0.7; }
.lfilter button:focus-visible, .lcard:focus-visible { outline: 3px solid var(--brand-text); outline-offset: 3px; }

.shelf { margin-top: 44px; }
.shelf[hidden] { display: none; }
.shelf h2 { font-size: 30px; padding-bottom: 14px; border-bottom: 2px solid var(--c); }
.shelf h3 { margin: 24px 0 12px; font-size: 14px; font-weight: 400; color: var(--sub); letter-spacing: 0.08em; }
.lgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }

.lcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text); background: #18232D; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 0 #0B1218; transition: transform .12s, box-shadow .12s; }
.lcard:hover { transform: translateY(-3px); box-shadow: 0 7px 0 #0B1218; }
.lcard:active { transform: translateY(2px); box-shadow: 0 2px 0 #0B1218; }
.lthumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #05070B; }
.lthumb img { width: 100%; height: 100%; object-fit: cover; }
.lthumb .code, .soon .code { position: absolute; left: 12px; top: 10px; font: 400 13px var(--pixel); color: #0A0E14; background: var(--c, #E6B35A); padding: 1px 7px; border-radius: 5px; letter-spacing: 0.04em; }
.lthumb em { position: absolute; right: 12px; top: 10px; font-style: normal; font-size: 13px; color: #D5DEE4; background: rgba(10, 14, 18, 0.85); padding: 1px 9px; border-radius: 8px; }
.lbody { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.lcard strong { font-size: 22px; font-weight: 400; letter-spacing: 0.03em; }
.lcard .hook { font-size: 15px; line-height: 1.7; color: #C7D2D9; }
.lcard .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.lcard .tags span { font-size: 13px; color: #D5DEE4; background: rgba(241, 247, 251, 0.07); padding: 1px 9px; border-radius: 7px; }

.soon { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 52px 18px 18px; border-radius: 16px; border: 2px dashed rgba(241, 247, 251, 0.14); color: var(--faint); font-size: 14.5px; line-height: 1.7; }
.soon .code { background: rgba(241, 247, 251, 0.12); color: var(--sub); font-family: var(--body); }
.soon strong { font-size: 20px; font-weight: 400; color: #C7D2D9; }

.lnext { margin-top: 56px; }
.lnext h2 { font-size: 26px; color: var(--sub); padding-bottom: 12px; border-bottom: 2px dashed rgba(241, 247, 251, 0.16); }
.lnext ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.lnext li { color: #C7D2D9; font-size: 15.5px; }
.lnext li span { display: inline-block; min-width: 5em; margin-right: 12px; color: var(--c); }

.lcta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.library .vcta { margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.library .vcta p { color: #D5DEE4; max-width: 36em; }
.library .vcta b { font-weight: 400; color: var(--text); }

@media (max-width: 560px) {
  .library { padding-top: 100px; }
  .lbear { width: 64px; }
  .lgrid { grid-template-columns: 1fr; }
}
.soon { align-self: start; }
