/* Dedicated educational document collections; scoped to avoid changing other libraries. */
.lm-collection-body{margin:0;background:#f5f7fb;color:#122b4b;font-family:"Noto Sans Thai",system-ui,sans-serif}
.lm-collection-body *{box-sizing:border-box}
.lm-collection-main{padding:0 0 76px;min-height:65vh}
.lm-collection-container{max-width:1220px;margin:0 auto;padding:0 22px}
.lm-collection-hero{background:linear-gradient(135deg,#143f7a 0%,#0d6f8e 56%,#0a7f8f 100%);color:#fff;padding:78px 20px 60px;text-align:center}
.lm-collection-hero-inner{max-width:1040px;margin:0 auto;text-align:center}
.lm-collection-hero h1{font-size:clamp(2.1rem,4.2vw,3.7rem);line-height:1.24;margin:0;font-weight:900;color:#fff;letter-spacing:-.02em}
.lm-collection-hero p{margin:18px auto 0;line-height:1.9;color:rgba(255,255,255,.90);max-width:900px;font-size:1.06rem}
.lm-collection-hero-stats{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-top:28px}
.lm-collection-stat{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:12px 18px;border-radius:999px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.24);box-shadow:inset 0 1px 0 rgba(255,255,255,.15);font-weight:800}
.lm-collection-stat strong{font-size:1.15rem;color:#fff59d;font-weight:900;line-height:1.2}
.lm-collection-stat span{color:#fff;font-weight:800;line-height:1.45}
.lm-collection-stat.wide{min-width:210px}
/* Search and sort: one desktop row, matching the established manual/policy libraries. */
.lm-collection-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin-top:42px;margin-bottom:20px}
.lm-collection-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-width:0;margin:0}
.lm-collection-search{display:flex;align-items:center;gap:10px;min-width:0;min-height:54px;padding:10px 16px;background:#fff;border:1px solid #e0e8f2;border-radius:20px;box-shadow:0 12px 28px rgba(7,36,77,.08);cursor:text}
.lm-collection-search span{color:#0b4f91;font-weight:900;white-space:nowrap;font-size:.91rem}
.lm-collection-search input{width:100%;min-width:0;height:32px;padding:0;border:0;outline:none;background:transparent;color:#152d4a;font:inherit;font-size:.92rem}
.lm-collection-search-button{display:inline-flex;align-items:center;justify-content:center;min-height:54px;padding:10px 25px;border:0;border-radius:18px;background:#0f567f;color:#fff;font:inherit;font-weight:850;white-space:nowrap;box-shadow:0 10px 22px rgba(8,43,87,.15);cursor:pointer}
.lm-collection-search-button:hover{background:#0c4365}
.lm-collection-sort{display:inline-flex;align-items:center;justify-content:flex-end;gap:10px;white-space:nowrap;color:#1b334d;font-size:.89rem;font-weight:750}
.lm-collection-sort select{width:198px;min-height:50px;max-width:100%;padding:10px 13px;border:1px solid #d5dfeb;border-radius:12px;background:#fff;color:#152d4a;font:inherit;font-size:.90rem;cursor:pointer}
.lm-collection-search:focus-within,.lm-collection-sort select:focus-visible,.lm-collection-search-button:focus-visible,.lm-collection-pages button:focus-visible{outline:3px solid #f0bb37;outline-offset:2px}
/* Multi-category libraries have the same pill-filter pattern as the manual library. */
.lm-collection-tabs{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;padding:14px;margin-bottom:20px;background:#fff;border:1px solid #e0e8f2;border-radius:26px;box-shadow:0 12px 32px rgba(7,36,77,.07)}
.lm-collection-tab{border:0;border-radius:999px;background:#f1f5fb;color:#0b2f5f;padding:11px 17px;min-height:42px;font:inherit;font-size:.84rem;font-weight:800;cursor:pointer;transition:background .17s,color .17s,box-shadow .17s}
.lm-collection-tab:hover{background:#e3edf8}
.lm-collection-tab.is-active,.lm-collection-tab[aria-pressed="true"]{background:linear-gradient(135deg,#061d43,#0e4e90);color:#ffe082;box-shadow:0 9px 21px rgba(7,36,77,.19)}
.lm-collection-tab:focus-visible{outline:3px solid #f0bb37;outline-offset:3px}
/* All four new collections share the same five-column cover-card layout
   as the existing manual and policy libraries. */
.lm-collection-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px;align-items:stretch}
.lm-collection-card{
  min-width:0;min-height:428px;padding:16px;border-radius:24px;
  background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);
  border:1px solid rgba(7,36,77,.09);box-shadow:0 10px 24px rgba(7,36,77,.07);
  overflow:hidden;display:flex;flex-direction:column;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease
}
.lm-collection-card:hover,.lm-collection-card:focus-within{
  transform:translateY(-3px);border-color:#8bccef;box-shadow:0 18px 42px rgba(7,34,68,.12)
}
.lm-collection-card[hidden]{display:none!important}
.lm-collection-cover-link{
  display:flex;align-items:center;justify-content:center;
  flex:0 0 245px;width:100%;height:245px;min-height:0;padding:16px;
  border-radius:20px;background:linear-gradient(180deg,#fff 0%,#f3f7fd 100%);
  border:1px solid rgba(7,36,77,.06);
  box-shadow:inset 0 1px 0 #fff,0 8px 18px rgba(7,36,77,.05);overflow:hidden
}
.lm-collection-cover-link img{
  display:block;width:100%;max-width:100%;height:213px;max-height:100%;
  object-fit:contain;object-position:center;border-radius:8px;
  filter:drop-shadow(0 9px 13px rgba(15,31,60,.12));transform:none
}
.lm-collection-card:hover .lm-collection-cover-link img,
.lm-collection-card:focus-within .lm-collection-cover-link img{transform:none}
.lm-collection-card-body{
  display:flex;flex-direction:column;flex:1;gap:9px;
  padding:13px 0 0;text-align:center;min-width:0
}
.lm-collection-card h2{
  margin:0;color:#0b2f5f;font-size:.96rem;font-weight:850;line-height:1.6;
  text-align:center;overflow-wrap:anywhere;
  /* Show no more than four lines; the underlying title is never shortened. */
  display:-webkit-box;-webkit-box-orient:vertical;
  -webkit-line-clamp:4;line-clamp:4;overflow:hidden
}
/* A focused title expands temporarily, including when tapped on a touch device.
   The full text also remains in the HTML, the cover link and the accessibility label. */
.lm-collection-card h2[tabindex]:focus{
  display:block;-webkit-line-clamp:unset;line-clamp:unset;overflow:visible;
  outline:2px solid #8bccef;outline-offset:3px;border-radius:3px
}
.lm-collection-card p{
  margin:0;color:#60738a;font-size:.81rem;line-height:1.7;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden
}
.lm-collection-open{
  margin-top:auto;display:flex;align-items:center;justify-content:center;
  flex:0 0 auto;width:100%;min-height:40px;padding:9px 12px;
  text-decoration:none;border-radius:999px;background:#eef5ff;color:#0b4f91;
  border:1px solid #d8e7f8;font-weight:900;font-size:.9rem;
  box-shadow:0 6px 14px rgba(8,43,87,.045);
  transition:transform .22s ease,background .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease
}
.lm-collection-open:hover,.lm-collection-open:focus-visible{
  transform:translateY(-2px);background:linear-gradient(135deg,#1846a3,#18a7b8);
  color:#fff;border-color:rgba(24,167,184,.45);box-shadow:0 12px 24px rgba(7,36,77,.16)
}
.lm-collection-open:focus-visible{outline:2px solid #1846a3;outline-offset:3px}
.lm-collection-empty,.lm-collection-notice{
  border:1px solid #e0e8f2;background:#fff;border-radius:18px;
  padding:32px 20px;text-align:center;color:#536985;margin:15px 0;line-height:1.8
}
.lm-collection-empty[hidden]{display:none!important}
/* Keep the original source attribution in the commemorative collection only. */
.lm-collection-body--nfe-library .lm-collection-hero .lm-collection-provenance{
  font-size:.87rem;color:rgba(255,255,255,.8);margin:8px auto 0;line-height:1.7
}
.lm-collection-body--nfe-library .lm-collection-card-body{gap:4px}
.lm-collection-body--nfe-library .lm-collection-card .lm-collection-location-subtitle{
  display:block;color:#60738a;font-size:.86rem;line-height:1.65;
  margin:0 0 13px;overflow-wrap:anywhere
}
@media(max-width:1100px){.lm-collection-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:860px){.lm-collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){
  .lm-collection-controls{grid-template-columns:1fr}
  .lm-collection-sort{justify-content:flex-end}
  .lm-collection-hero{padding:58px 22px 52px}
  .lm-collection-hero h1{font-size:clamp(1.8rem,5vw,3rem)}
}
@media(max-width:620px){
  .lm-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .lm-collection-card{min-height:365px;padding:12px;border-radius:20px}
  .lm-collection-cover-link{flex-basis:206px;height:206px;padding:12px;border-radius:16px}
  .lm-collection-cover-link img{height:182px}
  .lm-collection-card h2{font-size:.86rem}
  .lm-collection-body--nfe-library .lm-collection-card .lm-collection-location-subtitle{font-size:.79rem}
  .lm-collection-open{min-height:38px}
}
@media(max-width:540px){
  .lm-collection-container{padding:0 15px}.lm-collection-main{padding-top:0}
  .lm-collection-hero{padding:46px 18px 40px}
  .lm-collection-hero p{font-size:.92rem;line-height:1.8}
  .lm-collection-hero-stats{gap:10px;margin-top:22px}
  .lm-collection-stat{padding:12px 14px;min-height:48px}
  .lm-collection-controls{grid-template-columns:1fr;gap:12px;margin-top:26px}
  .lm-collection-search-form{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .lm-collection-search{padding:9px 12px;min-height:48px}
  .lm-collection-search-button{min-height:48px;padding:10px 16px}
  .lm-collection-sort{justify-content:space-between;width:100%}
  .lm-collection-sort select{flex:0 1 200px;width:auto;min-width:0}
  .lm-collection-tabs{padding:12px;gap:8px}
  .lm-collection-tab{padding:9px 13px;min-height:39px;font-size:.78rem}
  .lm-collection-card-body{padding-top:13px}
  .lm-collection-card p{display:none}
  .lm-collection-open{padding:9px 5px;font-size:.78rem}
}
@media(max-width:380px){
  .lm-collection-grid{grid-template-columns:1fr}
  .lm-collection-cover-link{flex-basis:236px;height:236px}
  .lm-collection-cover-link img{height:210px}
}
@media(prefers-reduced-motion:reduce){
  .lm-collection-card,.lm-collection-open{transition:none}
}

@media(max-width:390px){.lm-collection-search span{display:none}.lm-collection-search-button{padding:10px 13px}}
