/* ===== The Grand Library: shared theme layered over both original engines ===== */
@font-face{font-family:"GL Cinzel";src:url(fonts/rr-cinzel.woff2) format("woff2");font-weight:500 700;font-display:swap}
@font-face{font-family:"GL Garamond";src:url(fonts/rr-garamond-normal.woff2) format("woff2");font-weight:400 600;font-style:normal;font-display:swap}
@font-face{font-family:"GL Garamond";src:url(fonts/rr-garamond-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"GL Display";src:url(fonts/playfair-display-latin-700-normal.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"GL Display";src:url(fonts/playfair-display-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"GL Serif";src:url(fonts/source-serif-4-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"GL Serif";src:url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"GL Serif";src:url(fonts/source-serif-4-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
:root{
  --gl-caps:"GL Cinzel","Trajan Pro",Didot,Georgia,serif;
  --gl-disp:"GL Display","Playfair Display",Didot,Georgia,serif;
  --gl-body:"GL Serif","Source Serif Pro",Georgia,serif;
  --gl-book:"GL Garamond","EB Garamond",Garamond,Georgia,serif;
  --gl-night:#0f1a2c;--gl-night-2:#17243d;--gl-walnut:#2a1a12;--gl-ox:#5e1f1c;--gl-ox-2:#7a2a24;--gl-green:#1f4a36;
  --gl-brass:#c9a45c;--gl-brass-hi:#efd79c;--gl-brass-lo:#8a6a32;--gl-parch:#f4ead4;--gl-cream:#f3e7cf;--gl-cream-2:#e2d2b0;--gl-ink:#221a13;
  /* fold both engines' variables into one palette */
  --engr:var(--gl-caps);--disp:var(--gl-disp);--serif:var(--gl-body);--caps:var(--gl-caps);
  --brass:#c9a45c;--brass-hi:#efd79c;--brass-lo:#8a6a32;
}
body{font-family:var(--gl-body);font-size:18px;color:var(--gl-cream);background-color:#1c130e;
  background-image:
   radial-gradient(ellipse at 50% -6%,rgba(240,215,155,.17),transparent 48%),
   radial-gradient(ellipse at 8% 100%,rgba(224,120,40,.20),transparent 42%),
   radial-gradient(ellipse at 92% 100%,rgba(224,120,40,.12),transparent 40%),
   repeating-linear-gradient(90deg,rgba(0,0,0,0) 0 22px,rgba(0,0,0,.10) 22px 23px,rgba(255,210,160,.022) 23px 47px,rgba(0,0,0,.07) 47px 49px),
   linear-gradient(180deg,#0f1a2c 0,#17233b 160px,#2b1d16 520px,#22160f 75%,#170e09 100%);
  background-attachment:fixed}
/* ---- library bar ---- */
.gl-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px;max-width:820px;margin:0 auto;padding:calc(8px + env(safe-area-inset-top)) 14px 6px}
.gl-brand{font-family:var(--gl-caps);font-weight:700;letter-spacing:.16em;text-transform:uppercase;font-size:14px;color:var(--gl-brass-hi);text-decoration:none;display:flex;align-items:center;gap:8px;min-height:44px}
.gl-brand img{width:28px;height:28px;border-radius:6px;box-shadow:0 0 0 1px var(--gl-brass-lo)}
.gl-tabsnav{display:flex;gap:6px;flex-wrap:wrap}
.gl-tabsnav a{font-family:var(--gl-caps);font-weight:700;font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:var(--gl-cream);text-decoration:none;
  min-height:44px;display:inline-flex;align-items:center;padding:0 12px;border-radius:22px;border:1px solid rgba(201,164,92,.45);background:rgba(10,8,6,.35)}
.gl-tabsnav a[aria-current="page"]{background:linear-gradient(180deg,#f1d99c,#c9a45c 55%,#a47b35);color:#24170a;border-color:#5e4519}
/* ---- shared banner: a tall window of night sky between walnut bookshelves, a banker's lamp and a whiskey glass on the desk ---- */
.gl-banner{position:relative;width:100%;max-width:760px;margin:4px auto 0;aspect-ratio:3/1;border-radius:120px 120px 8px 8px;overflow:hidden;
  box-shadow:0 0 0 1px var(--gl-brass-lo),0 0 0 5px rgba(20,12,8,.92),0 0 0 6px rgba(201,164,92,.5),0 14px 30px rgba(0,0,0,.6)}
.gl-banner svg{display:block;width:100%;height:100%}
.gl-banner .tw{animation:gltw 4s ease-in-out infinite}
.gl-banner .tw.b{animation-delay:1.3s}.gl-banner .tw.c{animation-delay:2.6s}
@keyframes gltw{0%,100%{opacity:.95}50%{opacity:.3}}
.gl-banner .glow{animation:glflick 3s ease-in-out infinite}
@keyframes glflick{0%,100%{opacity:.8}30%{opacity:1}60%{opacity:.7}}
.gl-banner .smk{fill:none;stroke:rgba(235,225,210,.55);stroke-width:2;stroke-linecap:round;stroke-dasharray:6 120;animation:glcurl 6s linear infinite}
.gl-banner .smk.s2{animation-delay:3s;stroke-width:1.4}
@keyframes glcurl{0%{stroke-dashoffset:126;opacity:0}15%{opacity:.9}100%{stroke-dashoffset:0;opacity:0}}
h1{font-family:var(--gl-caps)!important}
.eyebrow{font-family:var(--gl-caps)}
.wing-note{text-align:center;margin:4px auto 0;font-family:var(--gl-disp);font-style:italic;color:var(--gl-cream-2);font-size:17px;max-width:560px}
/* book voice on every card */
.card .prompt,.card li,.card .lens{font-family:var(--gl-book)}
.card .prompt{font-size:20.5px}
.card li{font-size:18.5px}
/* ---- the shared ledger ---- */
.gl-tabs{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:4px 0 10px}
.gl-tab{font-family:var(--gl-caps);font-weight:700;font-size:13px;letter-spacing:.1em;text-transform:uppercase;min-height:44px;padding:0 12px;border-radius:22px;cursor:pointer;
  border:1px solid var(--gl-brass-lo);background:rgba(0,0,0,.3);color:var(--gl-cream)}
.gl-tab i{font-style:normal;opacity:.8}
.gl-tab.on{background:linear-gradient(180deg,#f1d99c,#c9a45c 55%,#a47b35);color:#24170a}
.gl-entry{background:var(--gl-parch);color:var(--gl-ink);border-radius:4px;padding:14px;margin:12px 0;box-shadow:0 0 0 1px #b99a64,0 6px 14px rgba(0,0,0,.45);text-align:left;list-style:none}
.gl-entry h4{font-family:var(--gl-disp);font-weight:700;font-size:21px;margin:2px 0;color:#1f140d;line-height:1.2}
.gl-entry p{margin:6px 0;font-size:17px;line-height:1.5}
.gl-meta{font-size:14.5px;color:#5b4634;font-style:italic}
.gl-badge{display:inline-block;font-family:var(--gl-caps);font-style:normal;font-weight:700;font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:#f4ead4;background:#5e1f1c;border-radius:3px;padding:1px 6px;margin-right:6px}
.gl-essay .gl-badge{background:#24477e}.gl-crossover .gl-badge{background:#1f4a36}
.gl-sparks{font-size:15.5px!important;color:#5b4634}
.gl-lens{font-family:var(--gl-disp);font-style:italic;color:#5e1f1c}
.gl-entry details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600;color:#1f4a36}
.gl-entry ol{margin:0 0 6px;padding-left:22px;font-size:16.5px}
.gl-entry label{font-family:var(--gl-caps);font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:#1f4a36;display:block;margin-top:8px}
.gl-entry textarea{width:100%;min-height:96px;border:1px solid #b99a64;border-radius:3px;padding:10px;font:inherit;font-size:17px;color:var(--gl-ink);resize:vertical;box-sizing:border-box;
  background:repeating-linear-gradient(180deg,#fffaf0 0 27px,#e6d6b6 27px 28px)}
.gl-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.gl-btn{min-height:44px;border-radius:6px;padding:6px 14px;cursor:pointer;font:600 15.5px var(--gl-body);color:var(--gl-cream);border:1px solid var(--gl-brass-lo);background:linear-gradient(180deg,#3d271b,#24160e)}
.gl-empty{text-align:center;font-style:italic;color:var(--gl-cream-2)}
.gl-list{padding:0;margin:0}
/* ---- readability: reading text 18px and up, small-caps labels 15px and up, in every wing ---- */
.sub,.hint,.door-desc,.door-count,.counter .cmp,.counter .small,.chip,.btn,.pick,.opt,.opt small,dd,.defs,.defs b,.defs span,.install p,.install b,footer,.shake small,.draw small,.alt,.link,.note,#breakdown,.gl-entry p,.gl-meta,.gl-entry ol,summary,.moredet summary #moreCount,.card-top,.card-top em,.sheet-head p,.sheet-count,#sheetCount,.toast,.empty-note,.placeholder,.math,.qs li,.card .when,.gl-btn,.pick span,.picks .pick span,.picks .pick em,.saved .meta,select,input,textarea{font-size:18px!important}
.eyebrow,.gl-brand,.gl-tabsnav a,.door-go,.door-num,.gl-tab,.pick b,.perlab,.ptag,.card .label,dt,.card h3,.stamp,.plaque,.plaque b,label,.step-num,.gl-badge,.grp,.fam,.btn.brass,.actions .btn,.opt.surprise,.sheet-head h3,.sheet-head .btn{font-size:15px!important}
.counter .digits{font-size:15px!important}
.math code{font-size:15px!important}
sup{font-size:.8em}
.stamp{white-space:normal;text-align:center}
.picks .pick b,.pick-btn,.pick-btn span{font-size:18px!important}
.gl-banner img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:520px){
  .gl-nav{flex-direction:column;align-items:stretch;gap:4px;padding-left:10px;padding-right:10px}
  .gl-brand{justify-content:center;min-height:36px}
  .gl-tabsnav{flex-wrap:nowrap;gap:4px}
  .gl-tabsnav a{flex:1 1 0;justify-content:center;padding:0 4px;letter-spacing:.04em;font-size:14px!important}
  .gl-banner{border-radius:70px 70px 6px 6px}
}
