/* All pages: compact controls inside the existing header. */
#reading-mode{box-sizing:border-box;max-width:1200px;margin:0 auto;padding:5px 16px 7px;display:flex;align-items:center;justify-content:flex-end;gap:8px;line-height:1.3;color:#24463b;font-size:12px;background:transparent;flex-wrap:wrap}
#reading-mode .reading-label{font-weight:700;white-space:nowrap;display:inline-flex;gap:4px;align-items:center}
#reading-mode .reading-options{display:inline-flex;gap:3px;border:1px solid #c9d9d1;padding:3px;border-radius:12px;background:#fff;max-width:100%}
#reading-mode button{font:inherit;font-size:12px;line-height:1.3;font-weight:700;white-space:nowrap;padding:5px 9px;min-height:34px;border:0;border-radius:8px;background:transparent;color:#284c40;cursor:pointer;letter-spacing:0}
#reading-mode button[aria-pressed=true]{background:#245b45;color:white}
#reading-mode button:focus-visible{outline:2px solid #2365ae;outline-offset:2px}
#reading-status{font-size:11px;color:#466354;flex-basis:100%;text-align:right;margin:0;line-height:1.4}
header.reading-fixed{height:auto!important}
.reading-segment{display:inline}
@media(max-width:700px){#reading-mode{justify-content:center;gap:5px;padding:4px 8px 6px}#reading-mode .reading-label{font-size:11px}#reading-mode button{padding:5px 6px;font-size:11px}#reading-status{text-align:center;font-size:10px}}
@media print{#reading-mode{display:none}}

/* Keep the original brand and give ruby text room in all controls. */
header .logo,header .brand{flex-shrink:0;min-width:0;align-items:center}
header .logo-mark,header .logo-mark img,header .brand img{flex-shrink:0;object-fit:contain;max-width:none}
#reading-mode .reading-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(100%,360px);box-sizing:border-box;align-items:stretch}
#reading-mode button{display:block;min-width:0;max-width:100%;white-space:normal;height:auto;min-height:44px;text-align:center;padding:7px 4px;line-height:1.8!important}
@media(max-width:700px){#reading-mode .reading-label{flex-basis:100%;justify-content:center}#reading-mode .reading-options{width:100%}#reading-mode button{font-size:12px}header .logo-mark img{width:42px;height:42px}}
#reading-mode .reading-options{width:min(100%,240px)}
#reading-mode button{white-space:nowrap;line-height:1.3!important}
header .logo-mark img{display:block;object-fit:contain}
