#display-ui .reader-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
#display-ui .reader-fields label{margin:.5rem 0;align-content:start}
#display-ui input[type=color]{cursor:pointer;padding:3px}
#display-ui .reader-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px}
#reading-sample{padding:12px 16px;margin:12px 0;border:1px solid var(--seam);border-radius:4px;color:var(--story-ink);background:var(--story-paper);font-size:var(--story-size,16px);line-height:var(--story-leading,1.85);overflow-wrap:anywhere}
#reading-status:empty{display:none}
#legacy-reader #legacy-copy article p{font-size:var(--story-size,16px);line-height:var(--story-leading,1.85)}
html[data-reading-palette]:not([data-reading-palette=theme]) #reading .message>.story-text,
html[data-reading-palette]:not([data-reading-palette=theme]) #legacy-copy article p{color:var(--story-ink);background:var(--story-paper)}
html[data-reading-palette]:not([data-reading-palette=theme]) #legacy-copy article p{padding:.5em .75em;border-radius:4px}
html[data-scenery=plain][data-reading-palette]:not([data-reading-palette=theme]) #reading{background:var(--story-paper)}
html[data-scenery=plain][data-reading-palette]:not([data-reading-palette=theme]) #reading .message>span{color:var(--story-ink);text-shadow:none}
html[data-scenery=plain][data-reading-palette]:not([data-reading-palette=theme]) #older-history{color:var(--story-ink)}
.masthead #quick-screen{flex:none;min-width:44px;min-height:44px;padding:4px 7px;color:var(--mist);font-size:.8rem}
.masthead #quick-screen[aria-pressed=true]{color:var(--bright-metal)}
@media(max-width:580px){
  body>.masthead{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:'title note screen' 'hud hud hud';align-items:center;gap:0 5px;padding-block:max(3px,env(safe-area-inset-top)) 4px}
  .masthead>.bookplate{grid-area:title;min-width:0}.masthead>.bookplate>div{min-width:0}
  .masthead>#note-dispenser{grid-area:note}.masthead>#quick-screen{grid-area:screen}
  .masthead>#status-hud{grid-area:hud;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch;max-width:none;width:100%;min-height:36px;gap:clamp(6px,3vw,16px);padding:2px 0}
  .masthead #status-hud .pc-gauge{width:100%;min-width:0;text-align:left}
  .masthead #status-hud .pc-gauge>div:first-child{flex-wrap:wrap;white-space:normal;line-height:1.15}
  .masthead #status-hud .pc-gauge :is(b,small){overflow-wrap:anywhere}
}
html.reader-immersive body>.masthead{display:flex;justify-content:flex-end;padding-block:max(2px,env(safe-area-inset-top)) 2px;gap:12px}
html.reader-immersive .masthead>.bookplate,html.reader-immersive .masthead>.mast-rule,html.reader-immersive .masthead>#note-dispenser{display:none}
html.reader-immersive .masthead>#status-hud{width:min(84%,320px)}
html.reader-immersive #reading>.history{padding-block:12px}
