html.sj-furigana-hidden ruby rt,html.sj-furigana-hidden ruby rp{visibility:hidden!important}
html body #sj-furigana-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;height:32px;min-height:32px;padding:0 10px;margin:0 12px 0 0;border:1px solid #9edfe0;border-radius:999px;background:#ecfaf8;color:#117d7f;font:600 13px/1.2 "Segoe UI",Arial,sans-serif;cursor:pointer;white-space:nowrap;box-shadow:none;box-sizing:border-box;transition:background .15s,border-color .15s}
html body #sj-furigana-toggle[aria-pressed=false]{color:#687684;border-color:#d6dde5;background:#fff}
html body #sj-furigana-toggle svg{width:17px;height:17px;flex:none}
html body #sj-furigana-toggle .sj-furi-eye-off{display:none}
html body #sj-furigana-toggle[aria-pressed=false] .sj-furi-eye-off{display:block}
html body #sj-furigana-toggle[aria-pressed=false] .sj-furi-eye-on{display:none}
html body #sj-furigana-toggle:hover{border-color:#19b5bc;background:#e1f7f5}
html body #sj-furigana-toggle:focus-visible{outline:2px solid #10a9b3;outline-offset:3px}
@media(max-width:991px){html body #sj-furigana-toggle{position:fixed;z-index:1051;right:var(--sj-furigana-mobile-right,130px);top:5px;width:32px;height:32px;min-height:32px;padding:0;margin:0}html body #sj-furigana-toggle .sj-furi-label{display:none}}
@media(prefers-reduced-motion:reduce){html body #sj-furigana-toggle{transition:none}}

/* Compact ash-grey control; never increases the site's header height. */
html body #sj-furigana-toggle#sj-furigana-toggle{height:26px!important;min-height:26px!important;max-height:26px!important;padding:0 7px!important;gap:4px!important;margin-right:8px!important;background:#f1f2f3!important;border-color:#c5c9ce!important;color:#626970!important;font:600 11px/1.2 "Segoe UI",Arial,sans-serif!important;box-shadow:none!important}
html body #sj-furigana-toggle#sj-furigana-toggle[aria-pressed=false]{background:#f1f2f3!important;border-color:#c5c9ce!important;color:#626970!important}
html body #sj-furigana-toggle#sj-furigana-toggle svg{width:14px!important;height:14px!important}
html body #sj-furigana-toggle#sj-furigana-toggle .sj-furi-label{font:inherit!important;line-height:inherit!important;letter-spacing:normal!important}
html body #sj-furigana-toggle#sj-furigana-toggle:hover{background:#e5e7e9!important;border-color:#aeb4bb!important}
@media(max-width:991px){html body #sj-furigana-toggle#sj-furigana-toggle{width:28px!important;height:28px!important;min-height:28px!important;max-height:28px!important;top:7px!important;padding:0!important;margin:0!important}}

/* Viewport anchor stays fixed when the question palette changes layout. */
@media(max-width:991px){html body #sj-furigana-toggle#sj-furigana-toggle{left:max(46px,calc(100vw - 181px))!important;right:auto!important;transform:none!important;translate:none!important}}

@media(min-width:769px) and (max-width:991px){html body #sj-furigana-toggle#sj-furigana-toggle{top:18px!important}}

/* Keep mouse/trackpad controls in the visible header row at every browser zoom.
   Touch devices retain the existing compact fixed slots. */
html.sj-desktop-study-controls body :is(#sj-xgt-toggle#sj-xgt-toggle,#sj-furigana-toggle#sj-furigana-toggle){
 position:static!important;inset:auto!important;transform:none!important;translate:none!important;
 width:auto!important;min-width:0!important;height:26px!important;min-height:26px!important;max-height:26px!important;
 padding:0 7px!important;margin:0 8px 0 0!important;font-size:11px!important;flex:0 0 auto!important;
}
html.sj-desktop-study-controls body #sj-furigana-toggle#sj-furigana-toggle .sj-furi-label{display:inline!important}
html.sj-desktop-study-controls body .sj-desktop-study-dock:not([hidden]){position:absolute!important;display:flex!important;align-items:center!important;gap:0!important;transform:translateY(-50%)!important;z-index:1051;white-space:nowrap}
html body .sj-desktop-study-dock[hidden]{display:none!important}
html.sj-desktop-study-controls body .sj-desktop-study-dock #sj-furigana-toggle#sj-furigana-toggle{margin-right:0!important}

/* A guest sign-in action and study controls occupy separate flex items. */
html.sj-desktop-study-controls body .sj-desktop-study-dock.sj-guest-study-dock:not([hidden]){position:static!important;inset:auto!important;transform:none!important;translate:none!important;display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0 12px 0 auto!important;max-width:100%;z-index:auto!important}
html.sj-desktop-study-controls body .main-responsive-menu:has(>.sj-guest-study-dock)>.option-item{margin-left:0!important}
html.sj-desktop-study-controls body .others-options:has(>.sj-guest-study-dock){display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}

/* Native guest sessions have the same compact public navigation as signed-out visitors. */
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu:has(.sj-public-signin) {position:static!important;display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;height:36px!important;min-height:0!important;margin:0!important;padding:0!important;transform:none!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .login:has(.sj-public-signin) {position:static!important;display:inline-flex!important;align-items:center!important;height:36px!important;margin:0!important;padding:0!important;line-height:1!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .sj-public-signin {position:static!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;height:36px!important;min-height:36px!important;max-height:36px!important;width:auto!important;min-width:0!important;margin:0!important;padding:7px 12px!important;background:#00ff00!important;color:#071c0e!important;border:0!important;border-radius:10px!important;font:750 13px/1.4 "Segoe UI",Arial,sans-serif!important;letter-spacing:0!important;white-space:nowrap!important;transform:none!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) {padding:0!important;min-height:56px!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) .main-navbar .navbar {height:52px!important;min-height:52px!important;padding:0!important;align-items:center!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) :is(.navbar-collapse,.navbar-nav,.others-options,.edly-header-user-sec) {align-items:center!important;min-height:0!important;margin-top:0!important;margin-bottom:0!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) .navbar-nav>.nav-item>.nav-link {padding-top:0!important;padding-bottom:0!important;line-height:1.4!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) .navbar-brand {height:32px!important;display:flex!important;align-items:center!important;margin-top:0!important;margin-bottom:0!important;padding:0!important;}
html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) .navbar-brand img {width:80px!important;height:32px!important;max-height:32px!important;object-fit:contain!important;}
html.sj-furigana-hidden body#page-site-index #sj-free-library ruby rt,html.sj-furigana-hidden body#page-site-index #sj-free-library ruby rp {visibility:hidden!important;}
@media(max-width:1199px){
 html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) {min-height:40px!important;}
 html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .sj-public-signin {height:30px!important;min-height:30px!important;max-height:30px!important;padding:4px 12px!important;}
 html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu:has(.sj-public-signin),html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .login:has(.sj-public-signin) {height:30px!important;}
 html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-signin) :is(.main-responsive-menu,.main-responsive-menu .mean-bar) {height:36px!important;min-height:36px!important;padding-top:0!important;padding-bottom:0!important;}
}

html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .sj-public-signin::before,html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .usermenu .sj-public-signin::after{content:none!important;display:none!important;}

/* Guest account actions remain visible outside the collapsed navigation. */
html body:not(#sj-public-header-a):not(#sj-public-header-b) .main-responsive-menu .sj-public-header-actions {position:absolute!important;right:40px!important;top:0!important;height:36px!important;display:flex!important;align-items:center!important;gap:10px!important;width:auto!important;visibility:visible!important;z-index:1001!important;}
html.sj-desktop-study-controls body .navbar-area .sj-public-header-actions .sj-guest-study-dock {margin:0!important;}

html.sj-desktop-study-controls body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area .main-responsive-menu > .sj-guest-study-dock {position:relative!important;z-index:1001!important;}

html body:not(#sj-public-header-a):not(#sj-public-header-b) .navbar-area:has(.sj-public-header-actions) .usermenu:has(.sj-public-signin):not(.sj-public-header-actions .usermenu) {display:none!important;}


/* Explicit action labels; reserve a separate slot before the settings button. */
@media(max-width:991px){
 html:not(.sj-desktop-study-controls) body #sj-furigana-toggle#sj-furigana-toggle{
  left:var(--sj-furigana-mobile-left,calc(100vw - 245px))!important;
  width:88px!important;padding:0 5px!important;gap:3px!important;
 }
 html:not(.sj-desktop-study-controls) body #sj-furigana-toggle#sj-furigana-toggle .sj-furi-label{display:inline!important;white-space:nowrap!important;font-size:10px!important;}
 html:not(.sj-desktop-study-controls) body #sj-furigana-toggle#sj-furigana-toggle svg{width:12px!important;height:12px!important;}
}
@media(max-width:359px){
 html:not(.sj-desktop-study-controls) body #sj-furigana-toggle#sj-furigana-toggle{width:68px!important;}
 html:not(.sj-desktop-study-controls) body #sj-furigana-toggle#sj-furigana-toggle .sj-furi-label{white-space:normal!important;line-height:11px!important;}
}

/* Stronger readings throughout the site. */
@layer sj-furigana-legibility{html ruby rt,html ruby rt *{font-weight:700!important;color:inherit!important;opacity:1!important;font-synthesis:weight!important}}
