.library-card { --attribution-secondary: #d5c8b4; --card-footer-color: #c8b79b; position: relative; width: 100%; height: 100%; color: #fffaf0; background: radial-gradient(ellipse at 50% 25%, #b88a4038, transparent 70%), #372d26; }
.library-card__content { position: absolute; top: var(--format-top); bottom: calc(var(--content-bottom) + 280px); left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 24px; }
.library-card__label { flex: none; margin: 0; font-size: 9px; letter-spacing: .14em; font-weight: 650; }
.library-card__folio { width: 100%; max-width: 460px; margin: auto; }
.library-card__page { position: relative; padding: 20px 20px 0; border-radius: 5px 22px 5px 5px; background: #f5eedf; color: #392f28; box-shadow: 0 14px 36px #190f1733; }
.library-card__page::before { content: ''; position: absolute; top: 0; right: 20px; width: 16px; height: 34px; background: #b5793f; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.library-card__book { padding-bottom: 16px; pointer-events: none; }
.library-card__identity { min-width: 0; }
.library-card__book-title { margin: 0 24px 10px 0; font: 500 clamp(28px, 8.8vw, 38px)/1.04 Georgia, serif; letter-spacing: -.035em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.library-card__book-author { font-size: 11px; line-height: 1.4; margin: 0; color: #7a624c; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.library-card__assignment { border-top: 1px solid #b49d763b; padding-top: 12px; }
.library-card__eyebrow { margin: 0 0 6px; font-size: 9px; font-weight: 650; letter-spacing: .12em; color: #846342; }
.library-card__readings { list-style: none; margin: 0; padding: 0; pointer-events: none; }
.library-card__reading { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 0; }
.library-card__reading + .library-card__reading { border-top: 1px solid #8067431c; }
.library-card__step { color: #b5793f; font: 400 23px/1 Georgia, serif; }
.library-card__location { display: block; margin-bottom: 3px; font-size: 10px; line-height: 1.3; color: #806247; }
.library-card__topic { display: block; font-size: 13px; line-height: 1.3; font-weight: 600; }
.library-card__topic, .library-card__location { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.library-card__actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }
.library-card__details { display: block; width: 100%; min-height: 52px; margin-top: 6px; padding: 12px 0; text-align: left; color: #79532d; background: transparent; border: 0; border-top: 1px solid #8067431c; font: inherit; font-size: 11px; line-height: 16px; cursor: pointer; }
.library-card__details::after { content: ' →'; }
.library-card__open { display: flex; flex: none; align-items: center; justify-content: center; width: fit-content; max-width: 100%; gap: 10px; min-height: 44px; padding: 10px 16px; color: #fff7e9; background: #55402d; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 650; }
.library-card__open::after { content: '↗'; font-size: 18px; }
.library-card__actions .library-card__open { background: #ead1a2; color: #463624; }
.library-card__access { margin: 8px 0 0; text-align: center; font-size: 9px; line-height: 1.4; color: #dfccb1; }
.library-card__info { position: absolute; bottom: calc(var(--content-bottom) + 62px); left: max(var(--edge), env(safe-area-inset-left)); right: calc(max(var(--edge), env(safe-area-inset-right)) + var(--social-reserve)); }
.library-card__info .card-attribution__name, .library-card__info .card-attribution__description { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.library-card__info .card-attribution__name { -webkit-line-clamp: 2; }
.library-card__info .card-attribution__credentials { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.library-card__info .card-attribution__description { -webkit-line-clamp: 3; }
.library-card__footer { position: absolute; bottom: var(--content-bottom); left: max(var(--edge), env(safe-area-inset-left)); right: max(var(--edge), env(safe-area-inset-right)); }
.library-card__notice { position: absolute; top: var(--format-top); left: var(--edge); right: var(--edge); z-index: 2; }
.library-card a:focus-visible, .library-card button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.library-guide { --sheet-surface: #faf7f1; --sheet-ink: #403329; --sheet-muted: #78634c; --sheet-border: #e5d9c6; --sheet-control: #efe5d4; --sheet-control-ink: #7c552d; --sheet-focus: #7c552d; --sheet-handle: #dacbb5; --sheet-backdrop: #251b1288; }
.library-guide__body { padding: 20px max(var(--edge), env(safe-area-inset-left)); overflow-wrap: anywhere; }
.library-guide__body h3 { font-size: 18px; margin: 0 0 12px; }
.library-guide__body p { font-size: 13px; line-height: 1.6; margin: 10px 0; white-space: pre-wrap; }
.library-guide__readings { list-style: none; margin: 20px 0 28px; padding: 0; }
.library-guide__reading { padding: 14px 0; border-block-start: 1px solid var(--sheet-border); }
.library-guide__location { font-size: 12px; color: #7c552d; font-weight: 650; }
.library-guide__reading h4 { font-size: 16px; margin: 7px 0 0; line-height: 1.4; }
.library-guide__section { display: inline-flex; align-items: center; min-height: 44px; color: #7c552d; font-size: 13px; }
.library-guide__access, .library-guide__reference { color: #6c5a48; }
.library-guide__footer { padding: 12px max(var(--edge), env(safe-area-inset-right)) var(--content-bottom); border-top: 1px solid var(--sheet-border); }
.library-guide a:focus-visible { outline: 2px solid var(--sheet-focus); outline-offset: 2px; }
@media (max-height: 740px) and (max-width: 699px) {
  .library-card__content { bottom: calc(var(--content-bottom) + 160px); gap: 16px; }
  .library-card__folio { max-width: none; margin: 0; }
  .library-card__page::before { width: 12px; height: 24px; right: 14px; }
  .library-card__page { padding: 12px 14px 0; border-radius: 5px 18px 5px 5px; }
  .library-card__book { padding-bottom: 8px; }
  .library-card__book-title { font-size: 22px; margin-bottom: 5px; -webkit-line-clamp: 2; }
  .library-card__book-author { font-size: 10px; }
  .library-card__assignment { padding-top: 5px; }
  .library-card__eyebrow { display: none; }
  .library-card__reading { grid-template-columns: 23px minmax(0, 1fr); padding: 5px 0; gap: 9px; }
  .library-card__step { font-size: 20px; }
  .library-card__location { font-size: 9px; margin-bottom: 2px; -webkit-line-clamp: 1; }
  .library-card__topic { font-size: 12px; -webkit-line-clamp: 1; }
  .library-card__actions { gap: 4px; margin-top: 8px; }
  .library-card__actions .library-card__open { padding-inline: 12px; font-size: 12px; }
  .library-card__details { min-height: 44px; margin-top: 0; }
  .library-card__access { margin-top: 4px; }
  .library-card__info { bottom: calc(var(--content-bottom) + 34px); }
  .library-card__info .card-attribution__description { font-size: 12px; margin-top: 8px; }
}
@media (max-width: 559px) and (max-height: 620px) {
  .library-card__book { padding-bottom: 5px; }
  .library-card__book-title { font-size: 20px; }
  .library-card__assignment { padding-top: 3px; }
  .library-card__reading-text { display: grid; grid-template-columns: 57px minmax(0, 1fr); align-items: baseline; gap: 5px; }
  .library-card__location { margin: 0; }
}
@media (min-width: 700px) {
  .library-card__content { left: 38%; right: calc(var(--edge) + var(--social-reserve)); bottom: calc(var(--content-bottom) + 36px); gap: 24px; }
  .library-card__folio { max-width: 540px; }
  .library-card__page { padding: 28px 28px 0; }
  .library-card__book-title { font-size: clamp(32px, 4vw, 46px); margin-bottom: 14px; }
  .library-card__book { padding-bottom: 24px; }
  .library-card__assignment { padding-top: 18px; }
  .library-card__reading { padding-block: 12px; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
  .library-card__step { font-size: 28px; }
  .library-card__topic { font-size: 16px; }
  .library-card__actions { margin-top: 20px; }
  .library-card__info { right: auto; width: 30%; }
}
@media (min-width: 560px) and (max-height: 480px) {
  .library-card__content { left: 37%; right: calc(var(--edge) + var(--social-reserve)); bottom: calc(var(--content-bottom) + 24px); gap: 12px; }
  .library-card__folio { margin: 0; }
  .library-card__page { padding: 10px 14px 0; border-radius: 5px 18px 5px 5px; }
  .library-card__page::before { height: 20px; width: 10px; right: 12px; }
  .library-card__book { padding-bottom: 5px; }
  .library-card__book-title { font-size: 20px; -webkit-line-clamp: 1; margin-bottom: 3px; }
  .library-card__book-author { font-size: 9px; }
  .library-card__assignment { padding-top: 3px; }
  .library-card__eyebrow { display: none; }
  .library-card__reading { grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
  .library-card__step { font-size: 19px; }
  .library-card__reading-text { display: grid; grid-template-columns: 63px minmax(0, 1fr); align-items: baseline; gap: 6px; }
  .library-card__topic { font-size: 11px; -webkit-line-clamp: 1; }
  .library-card__location { font-size: 9px; margin: 0; -webkit-line-clamp: 1; }
  .library-card__actions { gap: 10px; margin-top: 5px; }
  .library-card__details { min-height: 44px; margin-top: 0; }
  .library-card__open { min-height: 44px; padding: 4px 12px; font-size: 12px; }
  .library-card__access { font-size: 9px; margin-top: 4px; }
  .library-card__info { top: calc(var(--format-top) + 34px); bottom: auto; right: auto; width: 32%; }
  .library-card__info .card-attribution__name { font-size: 22px; }
  .library-card__info .card-attribution__description { font-size: 11px; margin-top: 8px; }
}
.library-guide__footer .library-card__open { margin-inline: auto; }
