.patterns-page #summaryRule { display: none; }
#patternFocus { display: flex; gap: 17px; align-items: center; padding: 23px 27px; border: 1px solid #f0d4ad; border-radius: 18px; background: #fff8ed; margin-bottom: 25px; }
.pattern-focus-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 13px; background: #ffecd0; color: #d97c24; }
.pattern-focus-icon .lib-icon { width: 28px; height: 28px; }
#patternFocus > div { flex: 1; min-width: 0; }
#patternFocus .library-eyebrow { font-size: 8px; color: #ab794a; }
#patternFocusName { font-size: 22px; font-weight: 800; line-height: 1.4; letter-spacing: -.04em; margin-top: 5px; }
#patternFocusCopy { font-size: 11px; color: #a08060; line-height: 1.8; margin-top: 7px; }
#patternFocusLink { font-size: 12px; padding: 11px 18px; flex-shrink: 0; }
#patternFocusLink .lib-icon { width: 16px; height: 16px; }
.patterns-page #cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.patterns-page .sectionHead { grid-column: 1 / -1; color: #aa8060; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; margin: 6px 0 1px; line-height: 1.8; }
.patterns-page .sectionHead .pawInline { width: 12px; height: 12px; }
.sectionNote { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #aa927b; line-height: 1.8; margin-top: 7px; max-width: 710px; }
.motifCard { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 18px; border: 1px solid var(--library-border); border-radius: 19px; background: #fff; padding: 23px; scroll-margin-top: 26px; transition: border-color .15s, box-shadow .15s; }
.motifCard:hover { border-color: #e7cba7; box-shadow: 0 8px 22px #9a5d1610; }
.motifCard.needsWork { border-color: #efce99; }
.motifCard.cleared { border-color: #d4e2bd; }
.pattern-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pattern-card-icon { display: grid; place-items: center; width: 35px; height: 35px; background: #fff0d8; border-radius: 10px; color: #d89039; }
.pattern-card-icon .lib-icon { width: 21px; height: 21px; }
.pattern-status { font-size: 8px; color: #b0997e; line-height: 1.6; }
.needsWork .pattern-status { color: #ac792e; }
.cleared .pattern-status { color: #769445; }
.cleared .pattern-card-icon { background: #f0f6e4; color: #769445; }
.cleared .pattern-card-icon .lib-icon { stroke-width: 2.5; }
.motifName { font-size: 19px; font-weight: 800; letter-spacing: -.035em; line-height: 1.35; }
.motifFamily { display: block; font-size: 10px; color: #b49a7f; font-weight: 600; letter-spacing: 0; line-height: 1.7; margin-top: 7px; }
.motifCount { font-size: 11px; color: #957454; line-height: 1.8; margin-top: 14px; }
.motifRecent { font-size: 9px; color: #b49d85; line-height: 1.7; margin-top: 5px; }
.motifCost { font-size: 10px; line-height: 1.8; font-weight: 650; color: #b56d4b; margin-top: 8px; }
.yourRecord { font-size: 10px; color: #b49d85; margin-top: 13px; line-height: 1.8; padding-top: 11px; border-top: 1px solid #f3ebe0; }
.yourRecord.needsWork { color: #b38a41; font-weight: 700; }
.yourRecord.cleared { color: #769445; font-weight: 700; }
/* Is the practice reaching real games (pattern_progress.js). Same small type
   as the record above it; the verdict's colour carries the tone. */
.motifProgress { font-size: 10px; line-height: 1.7; color: #9a8772; margin-top: 6px; }
.motifProgress strong { display: block; font-weight: 700; }
.motifProgress.good strong { color: #769445; }
.motifProgress.again strong { color: #b56d4b; }
.motifProgress.flat strong { color: #b38a41; }
.motifProgress.wait strong { color: #8a7a68; }
.cardLinks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.patterns-page .cardLinks .pressBtn { font-size: 11px; padding: 10px 14px; }
.motifCard.highlighted { border-color: #e4904c; box-shadow: 0 0 0 2px #e4904c; background: #fffaf2; }
.highlightNote { font-size: 10px; font-weight: 700; color: #b76d30; margin-top: 11px; }
#shelf { display: none; border: 1px solid #dce7c9; background: #f6f9ef; border-radius: 17px; padding: 21px 25px; margin-bottom: 27px; }
#shelf.shown { display: block; }
.patterns-page #shelf .sectionHead { color: #78954f; margin-bottom: 13px; }
#shelfRow { display: flex; gap: 9px; flex-wrap: wrap; }
.buriedChip { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 8px 12px; border: 1px solid #d8e3c7; border-radius: 9px; background: #fff; text-decoration: none; font-size: 11px; color: #78954f; line-height: 1.7; }
.buriedChip.dugUp { border-color: #ecd7ab; color: #b38a41; }
.buriedChip .mark { font-size: 12px; }
.buriedChip .when { color: #a6ae92; font-size: 9px; }
@media (max-width: 1080px) {
  .patterns-page #cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  #patternFocus { padding: 21px; }
  #patternFocusLink { font-size: 11px; padding: 10px 14px; }
}
@media (max-width: 680px) {
  .patterns-page #cards { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  #patternFocus { align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 22px; border-radius: 16px; }
  .pattern-focus-icon { width: 36px; height: 36px; border-radius: 10px; }
  .pattern-focus-icon .lib-icon { width: 23px; height: 23px; }
  #patternFocus > div { flex-basis: calc(100% - 49px); }
  #patternFocusName { font-size: 22px; }
  #patternFocusCopy { font-size: 11px; }
  #patternFocusLink { font-size: 12px; margin-top: 5px; padding: 11px 16px; }
  .motifCard { padding: 23px; gap: 16px; border-radius: 17px; }
  .motifName { font-size: 23px; }
  .motifFamily { font-size: 11px; }
  .motifCount { font-size: 12px; margin-top: 13px; }
  .motifRecent, .yourRecord { font-size: 10px; }
  .motifCost { font-size: 11px; }
  .pattern-status { font-size: 9px; }
  .patterns-page .cardLinks .pressBtn { font-size: 12px; padding: 10px 16px; }
  #shelf { padding: 20px; }
  .patterns-page .sectionHead { font-size: 10px; }
  .sectionNote { font-size: 11px; }
}
@media (max-width: 360px) {
  #patternFocus { padding: 20px; }
  .motifCard { padding: 20px; }
  .motifName { font-size: 21px; }
  .patterns-page .cardLinks .pressBtn { font-size: 11px; padding-inline: 14px; }
}
