/* ===== SealPal glass theme: the paper background, shared by the workspace (index.html) and the homepage ===== */
/* The page sits on plain paper, warm white by day and warm charcoal at night, under a fine paper grain at 10%
   (body::after). No photos: their blurred lights showed through the glass as glows. glass/theme-init.js sets
   <html data-theme="day|night"> before first paint and glass/glass.js adds the day/night toggle. */
:root{--serif:'Noto Serif SC','Songti SC','STSong',Georgia,serif;--radius-panel:10px;--radius-control:6px;--radius-inset:6px;--radius-dialog:12px}
.jg-theme-toggle{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:999px;border:1px solid transparent;background:none;color:inherit;padding:0;cursor:pointer}
.jg-theme-toggle svg{width:19px;height:19px}

/* Paper grain: fine fibres at 10% opacity over the background and under the page, so the tone stays even
   without getting in the way of the text. Drawn with SVG noise; no image to load. */
body::after{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.1;mix-blend-mode:multiply;background-size:240px 240px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch' result='g'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .45' numOctaves='2' seed='3' stitchTiles='stitch' result='f'/%3E%3CfeBlend in='g' in2='f' mode='multiply'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='.9' intercept='.35'/%3E%3CfeFuncG type='linear' slope='.9' intercept='.35'/%3E%3CfeFuncB type='linear' slope='.9' intercept='.35'/%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E")}

/* Day: warm white paper */
html[data-theme=day]{background:#f2eee6}
html[data-theme=day] .jg-theme-toggle{color:#3d3a35}
html[data-theme=day] .jg-theme-toggle:hover{background:rgba(255,255,255,.6)}

/* Night: warm charcoal paper, close to the old evening scenes' average tone; the grain blends as overlay so
   it shows on the dark */
html[data-theme=night]{background:#23211f}
html[data-theme=night] .jg-theme-toggle{color:rgba(255,255,255,.8)}
html[data-theme=night] .jg-theme-toggle:hover{background:rgba(255,255,255,.1)}
html[data-theme=night] body::after{mix-blend-mode:overlay}
