/* Shared Stage 1 design tokens. Presentation only; game engines and integrations remain untouched. */
:root{--s1-forest:#194b3c;--s1-ivory:#f8f5ec;--s1-gold:#e8af57;--s1-peach:#e8b7a5;--s1-ink:#24342f;--s1-muted:#52635b;--s1-line:#d8ded3;--s1-radius:18px;--s1-small-radius:10px;--s1-space:clamp(44px,6vw,76px);--s1-shadow:0 8px 26px #194b3c0b;--s1-font:'Trebuchet MS',Arial,sans-serif;--s1-editorial:Georgia,serif;}
.premium-surface{color:var(--s1-ink);background:var(--s1-ivory);font-family:var(--s1-font);line-height:1.6;--green:var(--s1-forest);--cream:var(--s1-ivory);--ink:var(--s1-ink);--muted:var(--s1-muted)}
.premium-surface *{box-sizing:border-box}
.premium-surface [hidden]{display:none!important}
.premium-surface :is(a,button,input,select,summary):focus-visible{outline:3px solid var(--s1-forest);outline-offset:4px;box-shadow:0 0 0 2px var(--s1-ivory)}
.premium-surface :is(a,button,summary):active{filter:brightness(.94)}
.premium-surface :is(button,input,select,summary,a){touch-action:manipulation}
.premium-surface :is(button,input,select){font-family:inherit}
.premium-surface h1,.premium-surface h2,.premium-surface h3{color:var(--s1-forest)}
.premium-section-nav{display:flex;justify-content:center;gap:8px 22px;flex-wrap:wrap;width:min(1120px,calc(100% - 40px));margin:18px auto;padding:12px 18px;border:1px solid var(--s1-line);border-radius:var(--s1-small-radius);background:#fffef9;font:700 13px/1.5 var(--s1-font)}
.premium-section-nav a{display:inline-flex;align-items:center;min-height:44px;color:var(--s1-forest);text-decoration:none;border-bottom:2px solid transparent}
.premium-section-nav a:hover{border-color:var(--s1-forest)}
.premium-library .topbar{background:var(--s1-ivory);border-bottom:1px solid var(--s1-line);box-shadow:none}
.premium-library .topbar-inner{max-width:1200px;gap:16px;padding:14px 20px;flex-wrap:wrap}
.premium-library .topbar .nav a{color:var(--s1-forest);min-height:44px;display:inline-flex;align-items:center}
.premium-library .topbar .nav .selected{background:#e8eddf}
.premium-library .audio-btn{min-height:44px;border-color:var(--s1-line);color:var(--s1-forest);background:#fffef9;border-radius:var(--s1-small-radius)}
.premium-library .main-width{max-width:1160px;padding-left:20px;padding-right:20px}
.premium-library main>.hero{max-width:1160px;margin:24px auto 0;border-radius:var(--s1-radius);overflow:hidden;background:#edf0e5;box-shadow:none}
.premium-library .hero picture img{width:100%;height:auto;min-height:0;object-fit:contain}
.premium-library .hero-caption{max-width:1160px;margin:0 auto;padding:28px 20px 20px;text-align:left}
.premium-library .hero-caption h2{font-size:clamp(28px,3.4vw,42px);line-height:1.2;letter-spacing:-.035em;color:var(--s1-forest)}
.premium-library .hero-caption p{max-width:70ch;color:var(--s1-muted);font-size:16px;line-height:1.6}
.premium-library .readiness-banner{max-width:1120px;margin:0 auto 34px;border:1px solid var(--s1-line);border-radius:var(--s1-small-radius);background:#eaf0e4;color:var(--s1-forest);padding:16px 20px;box-shadow:none}
.premium-library .section-top,.premium-library .section-heading{margin-top:32px;margin-bottom:22px;gap:20px;align-items:center}
.premium-library .section-top h2,.premium-library .section-heading h2{font-size:clamp(25px,3vw,34px);letter-spacing:-.035em;line-height:1.2}
.premium-library .section-top p,.premium-library .section-heading p{color:var(--s1-muted);font-size:14px;line-height:1.6}
.premium-library .category-grid{gap:16px;grid-template-columns:repeat(4,minmax(0,1fr))}
.premium-library .category-tile{border:1px solid var(--s1-line);border-radius:var(--s1-radius);box-shadow:none;overflow:hidden;transform:none;transition:border-color .16s;background:#fffef9}
.premium-library .category-tile:hover{transform:none;border-color:var(--s1-forest)}
.premium-library .category-tile[aria-pressed=true]{outline:3px solid var(--s1-forest);outline-offset:2px}
.premium-library .category-tile img{width:100%;height:150px;object-fit:contain;background:#edf0e5}
.premium-library .cat-name{color:var(--s1-forest);font-size:17px;line-height:1.3;min-height:48px}
.premium-library .cat-badge{background:#edf0e5;color:var(--s1-forest);font-size:12px;border:0;line-height:1.6}
.premium-library .future-subjects,.premium-library .collection-packs{border:1px solid var(--s1-line);border-radius:var(--s1-small-radius);background:#fffef9;padding:0;margin-top:24px}
.premium-library :is(.future-subjects,.collection-packs)>summary{padding:16px 18px;color:var(--s1-forest);font-weight:bold;cursor:pointer;min-height:56px}
.premium-library .future-subjects>p,.premium-library .future-subjects>.category-grid{margin:18px}
.premium-library .collection-packs>section{padding:18px}
.premium-library .featured-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.premium-library .featured-card,.premium-library .catalog-card,.premium-library .collection-card{border:1px solid var(--s1-line);border-radius:var(--s1-radius);box-shadow:none;background:#fffef9;padding:18px;min-width:0}
.premium-library .featured-card img{height:190px;object-fit:contain;background:#f2f1e8;box-shadow:none}
.premium-library .featured-card h3{font-size:20px;line-height:1.25}
.premium-library .featured-card p,.premium-library .catalog-description p{color:var(--s1-muted);font-size:14px;line-height:1.55}
.premium-library :is(.featured-card button,.catalog-description button,.more-button,.pill-action,.reset-button,.collection-browse){min-height:48px;padding:12px 16px;border-radius:var(--s1-small-radius);font-size:14px;font-weight:bold;line-height:1.4;box-shadow:none;transform:none}
.premium-library :is(.featured-card button,.more-button,.pill-action){background:var(--s1-forest);color:#fff;border:1px solid var(--s1-forest)}
.premium-library :is(.featured-card button,.more-button,.pill-action):hover{background:#24644f;transform:none}
.premium-library :is(.catalog-description button,.reset-button,.collection-browse){color:var(--s1-forest);background:#edf0e5;border:1px solid var(--s1-line)}
.premium-library .catalog-block{margin-top:44px;background:transparent;border:0;border-radius:0;box-shadow:none;padding-top:12px;padding-bottom:24px}
.premium-library .filters{padding:20px;gap:14px;background:#fffef9;border:1px solid var(--s1-line);border-radius:var(--s1-radius);grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr)) auto}
.premium-library .filters :is(input,select){min-height:48px;border:1px solid #7a8b7e;border-radius:var(--s1-small-radius);background:#fffef9;color:var(--s1-ink);font-size:16px}
.premium-library .filters label>span{color:var(--s1-forest);font-size:13px}
.premium-library .premium-availability-key{font-size:14px;color:var(--s1-muted);max-width:74ch;margin:22px 0 16px}
.premium-library .availability-tabs{display:flex;flex-wrap:wrap;gap:12px}
.premium-library .availability-tabs button{min-height:48px;padding:12px 18px;color:var(--s1-forest);border:1px solid var(--s1-forest);border-radius:var(--s1-small-radius);background:transparent;font-size:14px}
.premium-library .availability-tabs button[aria-pressed=true]{background:var(--s1-forest);color:#fff}
.premium-library .total-plan{background:#edf0e5;color:var(--s1-forest);border-radius:var(--s1-small-radius)}
.premium-library .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.premium-library .catalog-description h3{font-size:17px;line-height:1.3}
.premium-library .worksheet-thumb{width:78px;height:110px;flex:0 0 78px;object-fit:contain;border:1px solid var(--s1-line);border-radius:8px;background:white}
.premium-library .meta-chip,.premium-library .type-label{color:var(--s1-forest);background:#edf0e5}
.premium-library .meta-chip.age{color:var(--s1-ink);background:#f7e4c5}
.premium-library .modal-panel{border-radius:var(--s1-radius);font-family:var(--s1-font);color:var(--s1-ink)}
.premium-library .modal-panel :is(h2,h3){color:var(--s1-forest)}
.premium-library .modal-close{min-width:44px;min-height:44px;color:var(--s1-forest);background:#edf0e5}
.premium-library .modal-panel a.worksheet-link{min-height:48px;background:var(--s1-forest);color:#fff;border-radius:var(--s1-small-radius);display:flex;align-items:center;justify-content:center;text-align:center;padding:12px;line-height:1.4}
.premium-library .modal-status{background:#edf0e5;color:var(--s1-forest)}
.premium-library .educator-note,.premium-library .library-parent-note{border:1px solid var(--s1-line);background:#edf0e5;border-radius:var(--s1-radius);box-shadow:none}
.premium-library .site-footer{background:var(--s1-forest);color:#fff;font-family:var(--s1-font)}
.premium-games .header{background:var(--s1-ivory);box-shadow:none;border-bottom:1px solid var(--s1-line)}
.premium-games .header .nav{min-height:80px;height:auto;padding-top:14px;padding-bottom:14px;flex-wrap:wrap;gap:18px}
.premium-games #games .games-banner{border-radius:var(--s1-radius);box-shadow:none;min-height:0;margin-bottom:32px;background:#eaf0e4;overflow:hidden}
.premium-games #games .games-banner-art{height:auto;object-fit:contain;width:100%}
.premium-games #games .game-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.premium-games #games .game-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--s1-line);border-radius:var(--s1-radius);padding:0;background:#fffef9;box-shadow:var(--s1-shadow);overflow:hidden;transform:none}
.premium-games #games .game-card:hover{transform:none}
.premium-games #games .game-card .game-art{height:240px;min-height:0;aspect-ratio:auto;background:#edf0e5}
.premium-games #games .game-card .game-art img{width:100%;height:100%;object-fit:contain;transform:none}
.premium-games #games .game-card .game-copy{padding:22px;display:flex;flex-direction:column;flex:1;min-width:0}
.premium-games #games .game-card h3{font-size:22px;line-height:1.25;letter-spacing:-.025em;margin-bottom:12px}
.premium-games #games .game-card p{color:var(--s1-muted);font-size:14px;line-height:1.65}
.premium-games #games .game-tags{flex-wrap:wrap;margin-top:auto;margin-bottom:18px;gap:8px}
.premium-games #games .game-tags span{background:#edf0e5;color:var(--s1-forest);font-size:11px}
.premium-games #games .game-kicker{color:var(--s1-forest);font-size:11px;letter-spacing:1px}
.premium-games #games .forest-spark{display:none}
.premium-games #games .button{background:var(--s1-forest);color:#fff;border:1px solid var(--s1-forest);border-radius:var(--s1-small-radius);min-height:48px;box-shadow:none;padding:13px 20px;font-size:14px;font-weight:bold;line-height:1.4;transform:none;justify-content:space-between;gap:14px}
.premium-games #games .button:hover{background:#24644f;transform:none}
.premium-games .footer{background:var(--s1-forest);color:#fff}
/* Existing catalogue and institutional sections, including legacy deep links. */
.stage1 #books .premium-section-nav,.stage1 .premium-author-links .premium-section-nav{width:100%;margin:24px 0}
.stage1 #books .premium-book-meta{display:flex;flex-direction:column;gap:5px;font-size:12px;line-height:1.55;color:var(--s1-muted);padding:12px 0;margin-top:auto}
.stage1 #books .book .book-image img{object-fit:contain!important;transform:none!important}
.stage1 #books .book-tools input,.stage1 #books .book-tools select{min-height:48px;border-color:#7a8b7e;font-size:16px}
.stage1 #books .book-detail-button{min-height:44px;font-size:13px;color:var(--s1-forest)}
.stage1 #books .book .book-link{min-height:48px}
.stage1 #meet-the-creator .creator-profile{align-items:start;grid-template-columns:minmax(180px,.6fr) minmax(0,1.4fr);gap:32px}
.stage1 #meet-the-creator .creator-photo{margin:0;max-width:320px}
.stage1 #meet-the-creator .creator-photo img{width:100%;height:auto;object-fit:contain;border-radius:var(--s1-radius)}
.stage1 #meet-the-creator .creator-bio{max-width:68ch}
.stage1 #meet-the-creator .creator-bio h3{font-size:30px;line-height:1.2}
.stage1 #meet-the-creator .creator-bio p{font-size:16px;line-height:1.7}
.stage1 #meet-the-creator .creator-adult{border:1px solid var(--s1-line);background:var(--s1-ivory);border-radius:var(--s1-small-radius)}
.stage1 #meet-the-creator .creator-adult summary{min-height:56px;padding:18px}
.stage1 #meet-the-creator .creator-adult-label{color:var(--s1-forest)}
.stage1 #partners .community-partner{box-shadow:none;border:1px solid var(--s1-line);border-radius:var(--s1-radius);background:#fffef9}
.stage1 #partners .community-partner-link{min-height:44px;display:inline-flex;align-items:center}
.stage1 #partners .fussy-art{border:1px solid var(--s1-line)}
.stage1 #partners .fussy-art:focus-visible{outline-offset:5px}
@supports(grid-template-rows:subgrid){.stage1 #books>.books>.book{grid-row:span 6}}
.premium-privacy{max-width:800px!important;font:17px/1.75 var(--s1-font)!important;color:var(--s1-ink)!important;padding:28px!important}
.premium-privacy h1{font-size:clamp(32px,5vw,44px);line-height:1.2;letter-spacing:-.035em}
.premium-privacy button{min-height:48px;padding:12px 18px;background:var(--s1-forest);color:white;border:1px solid var(--s1-forest);border-radius:var(--s1-small-radius);font-size:14px;margin:12px 16px 12px 0}
.premium-privacy a{color:var(--s1-forest);text-underline-offset:3px}
@media(max-width:1100px){.premium-library .filters{grid-template-columns:repeat(2,minmax(0,1fr))}.premium-library .filters label:first-child{grid-column:1/-1}.premium-library .filters .reset-button{grid-column:1/-1}.premium-library .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.premium-games #games .game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.premium-section-nav{width:calc(100% - 32px);gap:6px 16px;padding:10px 14px;justify-content:flex-start;font-size:13px}.premium-library .main-width{padding-left:16px;padding-right:16px}.premium-library .topbar-inner{padding:12px 16px;gap:10px}.premium-library .audio-tools{gap:8px;margin-left:auto;flex-wrap:wrap}.premium-library .topbar .nav{gap:8px;justify-content:space-between;flex-wrap:wrap}.premium-library .hero-caption{padding:24px 16px 16px}.premium-library .readiness-banner{margin:0 16px 28px;padding:14px 16px;font-size:13px}.premium-library main>.hero{border-radius:0;margin-top:16px}.premium-library .category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.premium-library .category-tile img{height:clamp(100px,28vw,150px)}.premium-library .cat-name{font-size:15px}.premium-library .featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.premium-library .featured-card{padding:12px}.premium-library .featured-card h3{font-size:18px}.premium-library .featured-card img{height:160px}.premium-library .featured-card button{padding:12px 10px;font-size:13px}.premium-library .section-heading{flex-wrap:wrap;align-items:flex-start;gap:14px}.premium-library .filters{padding:16px}.premium-library .catalog-grid{grid-template-columns:1fr}.premium-library .catalog-card{padding:16px}.premium-library .catalog-block{margin-top:30px}.premium-library .availability-tabs button{flex:1 1 155px}.premium-library .collection-packs>section{padding:16px}.premium-library .modal-shell{padding:12px}.premium-library .modal-panel{padding:22px 18px}.premium-games .header .nav{min-height:76px;gap:12px}.premium-games .header .button{font-size:12px;padding:12px 14px}.premium-games #games .game-grid{grid-template-columns:1fr;gap:18px}.premium-games #games .game-card .game-art{height:230px}.premium-games #games .game-card .game-copy{padding:20px}.premium-games #games .game-card h3{font-size:23px}.premium-games #games .games-banner-copy{position:static;padding:20px;background:#edf0e5;color:var(--s1-forest)}.premium-games #games .games-banner-copy h1{font-size:34px;color:var(--s1-forest)}.premium-games #games .games-banner-copy p,.premium-games #games .games-banner-copy small{color:var(--s1-muted)}.premium-games #games .games-banner-art{position:static;min-height:0;height:auto;opacity:1;object-fit:contain}.stage1 #meet-the-creator .creator-profile{grid-template-columns:1fr;gap:24px}.stage1 #meet-the-creator .creator-photo{max-width:260px}.stage1 .premium-book-meta{font-size:11px}.premium-privacy{margin:16px auto!important;padding:22px!important}}
@media(max-width:420px){.premium-library .featured-grid{grid-template-columns:1fr}.premium-library .featured-card img{height:200px}.premium-library .topbar .nav a{font-size:11px}.premium-library .section-top{display:block}.premium-library .section-top p{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.premium-surface *,.premium-surface *::before,.premium-surface *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Match the existing #games selectors without altering launchers or game code. */
.premium-games #games .games-banner{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:0}
.premium-games #games .games-banner::after{display:none}
.premium-games #games .games-banner-art{position:static;inset:auto;order:0;z-index:auto;width:100%;height:auto;object-fit:contain}
.premium-games #games .games-banner-copy{position:static;order:1;width:auto;padding:28px}
.premium-games #games .game-grid .game-card{gap:0;margin:0;padding:0;background:#fffef9}
.premium-games #games .game-grid .game-art{height:240px;aspect-ratio:auto;max-width:none;width:100%;margin:0;border-radius:0;flex:none}
.premium-games #games .game-grid .game-copy{padding:22px}
.premium-games #games .game-grid h3{min-height:0}
.premium-games #games .game-card:hover .game-art img{transform:none}
.premium-games .header .button{min-height:48px;border-radius:var(--s1-small-radius);background:var(--s1-forest);color:white;box-shadow:none;transform:none}
@media(max-width:760px){.premium-games #games .games-banner{grid-template-columns:1fr}.premium-games #games .games-banner-copy{padding:20px}.premium-games #games .game-grid .game-art{height:230px}.premium-games #games .game-grid .game-copy{padding:20px}}
/* The library banner must not inherit the homepage hero's forest and spacing. */
.premium-library #main>.hero{display:block;min-height:0;height:auto;padding:0;width:100%;max-width:1160px;background:transparent;gap:0;grid-template-columns:none}
.premium-library #main>.hero::before{content:none;display:none;background:none}
.premium-library #main>.hero picture{display:block;line-height:0}
.premium-library #main>.hero picture img{display:block;width:100%;height:auto;min-height:0;max-height:none;object-fit:contain}
