/* White, deep blue and sunshine yellow: a welcoming teacher library. */
:root{--ink:#273033;--green:#12346c;--cream:#fff;--line:#e6e9ed;--gold:#ffc400;--navy:#12346c;--sun:#ffc400;--teal:#097e9c}
body{background:#fff;color:#2d3033;font-family:'Pridi','Noto Sans Thai',serif;font-size:16px;font-weight:400}button,input,select,textarea,h1,h2,h3,.nav,.paper{font-family:inherit}h1,h2,h3{font-weight:500}button{border-radius:24px;color:var(--navy)}button:hover{background:#fff8dc;border-color:#e7bd35}input:focus,textarea:focus,select:focus{outline:3px solid #ffe897;border-color:#bf9a2d}button:focus-visible,a:focus-visible{outline:3px solid #f1bc12;outline-offset:4px}aside{padding:15px max(28px,calc((100vw - 1310px)/2));background:#fff;border-bottom:1px solid #f0f1f3;box-shadow:none;gap:10px;min-height:86px}.brand{display:block;color:var(--navy);font-family:inherit;letter-spacing:0;font-size:25px;line-height:1.2;margin:0 22px 0 0;font-weight:500;white-space:nowrap}.brand .brand-mark{display:inline-block;color:var(--sun);font-size:31px;vertical-align:middle;margin-right:7px;transform:rotate(12deg)}.brand small{display:block;font-family:inherit;letter-spacing:0;color:#627084;font-weight:400;font-size:10px;line-height:1.5;margin:3px 0 0 36px}.nav{font-size:14px;font-weight:400;color:#363c44;padding:10px 15px}.nav.active{background:#fff0ae;color:var(--navy);font-weight:500}.nav:hover{background:#fff9df}.nav-join{background:var(--sun);border:1px solid var(--sun);color:#203350;margin-left:auto;font-size:14px;padding:9px 19px}.nav-join:hover{background:#f4bb00;border-color:#f4bb00}main{max-width:1360px;padding:0 30px 60px;margin:0 auto}header{height:38px;color:#7a8189;font-size:11px}header b{background:#fff5ce;color:#79601d}.profile{background:#fff0b3;color:#18386c;border:0}.library-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:center;gap:70px;padding:34px 4px 44px;background:white}.hero-kicker{font-size:12px;color:#738095;letter-spacing:.8px}.hero-copy h1{font-family:inherit;font-size:43px;letter-spacing:0;line-height:1.55;color:var(--navy);margin:10px 0 4px;font-weight:500}.hero-copy h2{font-size:26px;line-height:1.5;color:#343b45;font-weight:400;position:relative;display:inline-block}.hero-spark{color:#edb900;font-size:30px;display:inline-block;margin-left:14px;transform:rotate(14deg)}.hero-copy p{font-size:17px;line-height:1.9;color:#5e646e;margin:17px 0}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.hero-actions button{padding:10px 22px;min-height:44px;font-size:15px}.hero-find{background:var(--sun);border-color:var(--sun);color:#27333e}.hero-find:hover{background:#edb900;border-color:#edb900}.hero-play{border-color:#24477d;background:white;color:var(--navy)}.hero-feature{position:relative;display:block;border:0;border-radius:15px;padding:0;background:#fff9e7;overflow:visible;text-align:left;transform:rotate(1deg);box-shadow:12px 13px 0 #fff1bb;max-width:450px;width:100%;justify-self:end}.hero-feature:hover{background:#fff9e7;border:0;transform:rotate(0deg)}.hero-feature img{display:block;width:100%;max-height:240px;object-fit:contain;border-radius:15px 15px 0 0;background:#fff9e7}.feature-label{position:absolute;top:-14px;left:18px;background:var(--navy);color:white;font-size:12px;padding:7px 17px;border-radius:22px;z-index:1;transform:rotate(-2deg)}.feature-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 18px;background:#fff9e7;border-radius:0 0 15px 15px}.feature-caption b{font-family:'DM Sans',sans-serif;font-size:19px;color:var(--navy)}.feature-caption>span{font-size:11px;color:#526583}.library-layout{display:grid;grid-template-columns:245px minmax(0,1fr);gap:36px;align-items:start;scroll-margin-top:105px;padding-top:14px;border-top:1px solid #edf0f3}.library-results{min-width:0}.filter-panel{position:sticky;top:103px;max-height:calc(100dvh - 120px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d3d9e3 white;border:1px solid #e4e8ef;border-radius:15px;padding:20px 18px;background:white}.filter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:20px}.filter-heading h2{font-size:18px;font-weight:500;color:var(--navy);line-height:1.5}.filter-heading button{font-size:12px;border:0;padding:3px 0;background:none;color:#78818b;min-height:30px;white-space:nowrap;text-decoration:underline}.filter-search-label{font-size:14px;color:#46556e;display:block;margin-bottom:8px}.filter-search{position:relative;margin-bottom:23px}.filter-search input{padding:11px 30px 11px 12px;font-size:13px;border-radius:8px;border:1px solid #dce2eb;min-height:44px}.filter-search>span{position:absolute;right:12px;top:8px;color:#7d8c9d;font-size:24px;pointer-events:none}.filter-groups{display:block}.filter-group{border-top:1px solid #ebedf2;padding:16px 0}.filter-group summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:15px;color:var(--navy);list-style:none;font-weight:500;gap:8px}.filter-group summary::-webkit-details-marker{display:none}.filter-group summary>span{font-size:19px;font-family:sans-serif;color:#8d96a4}.filter-group[open] summary{margin-bottom:11px}.filter-group[open] summary>span{transform:rotate(180deg)}.filter-option{display:flex;align-items:center;gap:10px;font-size:14px;line-height:1.6;cursor:pointer;min-height:36px;padding:4px 0}.filter-option input{accent-color:var(--navy);width:17px;height:17px;margin:0;border-radius:3px;flex-shrink:0}.filter-option>span{flex:1;color:#515d6f}.filter-option small{font-family:'DM Sans',sans-serif;font-size:11px;background:#f2f4f7;color:#8590a0;border-radius:10px;min-width:23px;text-align:center;padding:2px 5px}.filter-group input[type=search]{font-size:12px;padding:10px;border-radius:8px}.filter-help{font-size:10px;line-height:1.7;color:#8994a4;margin:7px 0 0}.filter-panel .primary{background:var(--sun);border-color:var(--sun);color:var(--navy)}#filter-done{display:none}.tool-strip{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 26px;gap:12px}.tool-strip button{display:grid;grid-template-columns:35px 1fr;align-items:center;align-content:center;gap:3px 10px;padding:14px 16px;border-radius:12px;border:1px solid #eee9d6;min-height:86px;transition:transform .15s}.tool-strip button:nth-child(1){background:#fff9e7}.tool-strip button:nth-child(2){background:#f0f6fc;border-color:#e1e8f2}.tool-strip button:nth-child(3){background:#f1f8f6;border-color:#e0ece7}.tool-strip button:nth-child(1) span{background:#ffedaa;color:#9a7612}.tool-strip button:nth-child(2) span{background:#dce8f7;color:#234f86}.tool-strip button:nth-child(3) span{background:#deeee8;color:#2f806e}.tool-strip button>span{width:35px;height:40px;border-radius:10px;font-size:23px;grid-row:1/3;margin:0}.tool-strip b{font-size:17px;color:var(--navy);font-weight:500}.tool-strip small{font-size:11px;color:#768193;font-weight:400;display:block}.section-title{margin-top:0;align-items:center;gap:15px}.section-title h2{font-family:inherit;font-size:28px;color:var(--navy);font-weight:500}.results-eyebrow{font-size:11px;color:#8a929d;margin:0 0 4px}.sort-control{display:flex;align-items:center;gap:8px;font-size:11px;white-space:nowrap;color:#8a929d}.sort-control select{width:auto;border:1px solid #e2e7ee;border-radius:24px;font-size:12px;min-height:38px;padding:7px 24px 7px 12px;color:#45536a;background:white}.results-summary{display:flex;align-items:center;gap:15px;justify-content:space-between;margin:12px 0 3px;color:#7b8799;font-size:12px}.results-summary #count{font-size:13px;color:var(--teal)}.preview-caption{font-size:11px;color:#929ba8}.active-filters{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.active-filters:empty{margin:0}.active-filters button{padding:5px 10px;border-radius:20px;background:#edf5f8;border-color:#deebf0;color:#39718a;min-height:30px;font-size:11px}.active-filters button>span{margin-left:6px;color:#59869c}.library-results .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:18px}.library-results .card{border:1px solid #e6e9ee;border-radius:12px;background:white;overflow:hidden;box-shadow:none}.library-results .card:hover{box-shadow:0 8px 24px #233e6510;border-color:#d4dfec}.library-results .product-cover{aspect-ratio:4/3!important;border-radius:0!important;background:#faf9f5!important;position:relative}.library-results .product-cover img{height:100%;object-fit:contain}.game-ready-tag{position:absolute;bottom:10px;left:10px;background:#fff5c7;color:#6b5412;padding:4px 9px;border-radius:20px;font-size:10px;box-shadow:0 2px 8px #00000009}.library-results .card-thumbs{padding:8px 9px 0;gap:5px}.library-results .card-thumbs button{border-color:#e6e9ef;min-height:0}.card-body{padding:16px}.card-tags{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.tag,.grade-tag{background:#e9f4f8;color:#087e9c;font-size:10px;border-radius:18px;padding:4px 10px;font-weight:400}.grade-tag{background:#f1f3f7;color:#687790}.card h3{font-family:inherit;font-size:20px;color:#263f66;font-weight:500;margin:12px 0 6px;line-height:1.5}.product-subtitle{font-size:13px;color:#4e5c70;line-height:1.7}.card p{font-size:11px;color:#8993a2;line-height:1.8;margin:8px 0 14px;min-height:40px}.product-open{font-family:inherit;color:var(--teal);background:transparent;border:0;padding:4px 0;min-height:30px;font-size:12px;text-align:left}.product-open:hover{background:transparent;color:var(--navy);border:0;text-decoration:underline}.catalog-footnote{font-size:11px;color:#929ba9;margin:25px 0}.mobile-library-search{display:none}#filter-dialog{width:min(440px,95vw);max-height:91dvh;padding:18px 14px 14px;border:0;border-radius:20px;color:var(--ink)}#filter-dialog::backdrop{background:#18345466;backdrop-filter:blur(3px)}#close-filter-dialog{position:absolute;right:14px;top:10px;z-index:3;width:38px;height:38px;min-height:38px;padding:0;font-size:24px;background:white;border:0;color:var(--navy)}#filter-dialog .filter-panel{border:0;position:static;max-height:calc(91dvh - 40px);overflow:auto;padding:8px 10px 10px}#filter-dialog .filter-heading{padding-right:32px}#filter-dialog #filter-done{display:block;position:sticky;bottom:0;margin-top:15px;margin-bottom:0;box-shadow:0 -8px 12px #ffffffed}.empty{background:#fffdf5;border-color:#e8d494;text-align:center;color:#6e7989}.empty h3{font-size:22px;color:var(--navy)}.empty p{font-size:14px}.empty button{background:var(--sun);border-color:var(--sun);font-size:13px;padding:9px 18px}.primary,.live-primary{background:var(--sun);border-color:var(--sun);color:var(--navy)}.primary:hover,.live-primary:hover{background:#edb900;border-color:#edb900;color:var(--navy)}.game-template button[data-open-room]{background:var(--sun);border-color:var(--sun);color:var(--navy)}.game-template button[data-play]{border-color:var(--navy);color:var(--navy);background:white}.eyebrow{color:#7d8a9d}.view:not(#library)>h1,.live-heading h1{font-family:inherit;color:var(--navy)}.live-stage h1,.live-stage h2{color:#fff}.teach-button{background:var(--sun);border-color:var(--sun);color:var(--navy)}.teach-button:hover{background:#edb900;color:var(--navy)}.detail-games{color:var(--navy);border-color:var(--navy);background:#fff}.room-tabs button.selected{background:var(--navy);border-color:var(--navy)}.live-stage{background:var(--navy)}.auth-dialog h2{color:var(--navy)}
@media(max-width:1150px){aside{padding:12px 20px;gap:5px}.brand{font-size:22px;margin-right:10px}.nav{font-size:12px;padding:10px 12px}.nav-join{font-size:12px}.library-hero{gap:35px}.hero-copy h1{font-size:37px}.hero-copy h2{font-size:22px}.hero-copy p{font-size:15px}.library-layout{grid-template-columns:230px minmax(0,1fr);gap:25px}.library-results .grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-strip{gap:9px}.tool-strip button{padding:12px;gap:3px 7px;grid-template-columns:28px 1fr}.tool-strip button>span{width:28px;height:34px;font-size:20px}.tool-strip b{font-size:15px}.tool-strip small{font-size:10px}}
@media(max-width:900px){#filter-slot{display:none}.library-layout{grid-template-columns:1fr;gap:0}.mobile-library-search{display:flex;align-items:center;gap:10px;margin-bottom:20px}.mobile-library-search input{font-size:16px;padding:11px 16px;border-radius:24px;min-width:0;border-color:#dce4ef}.mobile-library-search button{white-space:nowrap;border-color:var(--navy);color:var(--navy);font-size:14px;padding:10px 18px}.library-hero{gap:26px}.hero-copy h1{font-size:34px}.hero-copy h2{font-size:20px}.hero-actions button{font-size:13px;padding:10px 17px}.library-results .grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tool-strip small{display:block}.feature-caption{padding:12px}.feature-caption>span{display:none}.hero-feature img{max-height:220px}}
@media(max-width:700px){body{font-size:15px}aside{min-height:0;padding:14px 16px 7px;gap:6px;grid-template-columns:repeat(4,minmax(0,1fr))}.brand{font-size:23px;margin:0;padding-bottom:12px;line-height:1.2}.brand small{display:inline-block;font-size:9px;margin:0 0 0 12px;max-width:95px;vertical-align:middle;white-space:normal;line-height:1.5}.brand .brand-mark{font-size:26px;margin-right:4px}.nav:not(.nav-join){font-size:13px;padding:9px 4px}.nav-join{right:15px;top:15px;padding:7px 12px;font-size:11px;min-height:35px}.student-mode aside .brand small{display:none}main{padding:0 17px 40px}header{display:none}.library-hero{grid-template-columns:1fr;gap:26px;padding:27px 1px 32px}.hero-kicker{font-size:10px;letter-spacing:.2px}.hero-copy h1{font-size:32px;margin:10px 0 4px;line-height:1.5}.hero-copy h2{font-size:20px;line-height:1.6}.hero-spark{font-size:25px;margin-left:10px}.hero-copy p{font-size:14px;margin:13px 0;line-height:1.8}.hero-actions{margin-top:16px;gap:9px}.hero-actions button{font-size:13px;padding:9px 17px;min-height:42px}.hero-feature{max-width:100%;width:100%;justify-self:stretch;box-shadow:6px 7px 0 #fff1bb;transform:rotate(0deg)}.hero-feature img{max-height:200px;width:100%;aspect-ratio:16/9;object-fit:contain}.feature-label{top:-11px;left:13px;font-size:10px;padding:5px 12px}.feature-caption{padding:10px 14px}.feature-caption b{font-size:17px}.feature-caption>span{display:block;font-size:10px}.library-layout{padding-top:22px;scroll-margin-top:120px}.mobile-library-search{gap:8px;margin-bottom:17px}.mobile-library-search button{font-size:13px;padding:10px 14px}.mobile-library-search input{font-size:16px;padding:10px 14px}.tool-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:25px}.tool-strip button{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:13px 7px;min-height:94px}.tool-strip button>span{width:32px;height:32px;font-size:21px}.tool-strip b{font-size:14px}.tool-strip small{display:none}.section-title h2{font-size:25px}.results-eyebrow{font-size:10px}.sort-control{font-size:0;gap:0}.sort-control select{font-size:11px;min-height:36px;max-width:110px;padding:6px 15px 6px 11px}.results-summary{font-size:11px;margin-top:12px;gap:8px;flex-wrap:wrap}.results-summary #count{font-size:12px}.preview-caption{font-size:10px}.library-results .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:15px}.library-results .card-body{padding:13px}.card h3{font-size:18px}.product-subtitle{font-size:12px}.card p{font-size:10px;margin:8px 0 10px}.product-open{font-size:11px}.catalog-footnote{font-size:10px}.filter-panel input[type=search]{font-size:16px}.filter-search input{font-size:16px}.filter-help{font-size:11px}.filter-heading h2{font-size:21px}.filter-group summary{font-size:17px}.filter-option{min-height:43px;font-size:16px}.filter-group input[type=search]{font-size:15px}.filter-panel #filter-done{font-size:16px;padding:12px}.student-mode .nav-join{min-height:36px}.student-mode aside{min-height:64px}.empty{padding:26px 18px}.empty h3{font-size:20px}}
@media(max-width:460px){.library-results .grid{grid-template-columns:1fr;gap:23px}.library-results .product-cover{aspect-ratio:4/3!important}.library-results .card-body{padding:18px 20px}.card h3{font-size:23px}.product-subtitle{font-size:15px}.card p{font-size:12px;min-height:0}.product-open{font-size:14px;min-height:40px}.tag,.grade-tag{font-size:11px}.game-ready-tag{font-size:11px}.library-results .card-thumbs{gap:7px;padding:10px 12px 0}}
@media print{.library-hero,.filter-panel,#filter-dialog,.mobile-library-search{display:none!important}body,.paper{font-family:'TH Sarabun New','Sarabun',serif}}
#filter-slot{align-self:stretch}

.source-preview-types { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.source-preview-types button[aria-pressed="true"] { background: #e6f1f5; color: #153757; border-color: #bacfdb; }

.document-title-cover{height:100%;min-height:145px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:.7rem;text-align:left;padding:1.5rem;color:#203958;background:#fff8de;border-top:5px solid #e7bd48}
.document-title-cover small{font-size:.85rem}.document-title-cover strong{font-size:clamp(1.3rem,2vw,1.85rem);line-height:1.35}.file-section h4{margin:1rem 0 .25rem;color:#253d61}

.product-card .product-cover:has(img[src^="covers/pa-"]){aspect-ratio:4/5!important;height:auto;width:100%}

.catalog-recency{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;color:#4c6077;font-size:.84rem;margin:.35rem 0 .55rem}.catalog-recency strong{padding:.12rem .6rem;border-radius:1rem}.catalog-recency .fresh{background:#ffe477;color:#433203}.catalog-recency .updated{background:#d8eff4;color:#16475c}
.spark-entry{display:flex;align-items:center;justify-content:space-between;gap:.65rem;flex-wrap:wrap;width:100%;padding:1rem 1.25rem;margin:.75rem 0;background:#fff6cd;color:#1b395b;border:1px solid #e7cb74;border-radius:16px;text-align:left;font:inherit;cursor:pointer}.spark-entry strong{font-size:1.2rem}.spark-browser{padding:clamp(18px,4vw,50px);color:#223958}.spark-browser nav{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem;margin-right:32px;font-size:.9rem}.spark-browser nav button{background:transparent;border:0;text-decoration:underline;color:#17617c;font:inherit;cursor:pointer}.spark-browser h2{margin:1rem 0 .4rem}.spark-browser h3{margin:.4rem 0 1rem}.spark-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:.65rem}.spark-options button{padding:1rem;border:1px solid #d4dfe8;border-radius:12px;background:#f9fbff;color:#203c60;text-align:left;cursor:pointer;font:inherit}.spark-options span{display:block;color:#456477;font-size:.85rem}.spark-options button:hover,.spark-options button:focus-visible{background:#fff6cf;border-color:#bea23e}.spark-browser .file-section a{overflow-wrap:anywhere}
.spark-collection-covers{width:100%;height:100%;display:flex;align-items:center;justify-content:center;gap:2.5%;background:#fff7db;padding:0 4%;box-sizing:border-box}.product-cover .spark-collection-covers .spark-book-cover{width:29%;height:auto;max-height:78%;object-fit:contain;filter:drop-shadow(0 3px 4px #27334b36)}.spark-options .spark-book-cover{display:block;width:auto;height:clamp(105px,14vw,185px);margin:0 auto .75rem;object-fit:contain}
.promotion-cover{width:100%;min-height:170px;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;gap:.55em;padding:8%;box-sizing:border-box;color:#fff;background:linear-gradient(116deg,#102653 65%,#184477 65%,#184477 79%,#254e79 79%);border-top:5px solid #dbb963}.promotion-cover strong{font:700 clamp(1.1rem,2vw,1.9rem) Pridi,serif}.promotion-cover small{color:#ffe9a9}.promotion-cover span{font-size:.92rem}.detail-gallery .promotion-cover{min-height:260px}

.lesson-quiz{margin:1rem 0;padding:.85rem 1rem;background:#fffae6;border:1px solid #eed987;border-radius:12px;color:#183757}
.lesson-quiz summary{cursor:pointer;font-weight:700}
.lesson-quiz>div{padding:.55rem 0;border-bottom:1px solid #eadfb9}
.lesson-quiz label{display:block;cursor:pointer}
.lesson-quiz small{display:block;margin-left:1.5rem}
.lesson-quiz button{margin-top:.75rem}
