/* Slightly larger two-line service name; retain the centered artwork dimensions. */
a.sm-brand,a.yz-logo.sm-brand{
 --sm-tagline-size:7.5px;
 display:grid;grid-template-columns:max-content 35px;grid-template-rows:auto auto;
 align-items:center;column-gap:6px;row-gap:2px;flex:none;min-width:0;
 text-decoration:none;line-height:1.2;
}
.sm-brand>b,.yz-home .yz-logo.sm-brand>b{
 grid-column:1;grid-row:1;display:block;margin:0;padding:0;
 font-family:var(--round,"Zen Maru Gothic","Hiragino Sans",Meiryo,sans-serif);
 font-size:calc(var(--sm-tagline-size) * 2.17);font-weight:800;line-height:1.2;
 letter-spacing:0;white-space:nowrap;overflow:visible;text-overflow:clip;
}
.sm-brand .sm-mark{
 grid-column:2;grid-row:1 / 3;display:block;width:35px;height:35px;
 object-fit:contain;border-radius:6px;
}
.sm-brand .sm-tagline{
 grid-column:1;grid-row:2;display:block;align-self:start;margin:0;padding:0;
 font-family:var(--font,var(--jp,Meiryo,sans-serif));font-size:calc(var(--sm-tagline-size) * 1.04);
 line-height:1.4;font-weight:400;letter-spacing:0;white-space:nowrap;
 color:var(--muted,var(--ink-2,#6c756d));background:none;border:0;border-radius:0;
}
/* Explicit areas keep the actions on the right when the course gets its own row. */
.yz-home .yz-bar-in,.yz-home .yz-bar-in.has-site-menu{
 height:auto;min-height:62px;padding:8px 18px;
 grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
 grid-template-areas:"brand course actions";gap:8px 12px;
}
.yz-home .yz-bar-in>.yz-logo{grid-area:brand;justify-self:start;overflow:visible}
.yz-home .yz-bar-in>.yz-course{grid-area:course;justify-self:center}
.yz-home .yz-bar-in>.yz-header-actions{grid-area:actions;justify-self:end;margin:0}
@media(min-width:700px){
 a.sm-brand,a.yz-logo.sm-brand{--sm-tagline-size:8.25px;grid-template-columns:max-content 42px;column-gap:8px}
 .sm-brand .sm-mark{width:42px;height:42px}
}
@media(max-width:699px){
 .yz-home .yz-bar-in,.yz-home .yz-bar-in.has-site-menu{
  grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "course course";
  padding:7px 14px 5px;gap:2px 8px;
 }
 .yz-home .yz-bar-in>.yz-course,.yz-home .yz-bar-in.has-site-menu>.yz-course{
  display:block;font-size:19px;line-height:1.4;padding:0;text-align:center;
 }
 .yz-home .yz-bar-in.has-site-menu>.yz-header-actions{gap:3px}
}
@media(max-width:359px){
 a.sm-brand,a.yz-logo.sm-brand{--sm-tagline-size:7px;grid-template-columns:max-content 32px;column-gap:6px}
 .sm-brand .sm-mark{width:32px;height:32px}
 .yz-home .yz-bar-in,.yz-home .yz-bar-in.has-site-menu{padding-inline:10px;column-gap:6px}
 .header-inner{padding-inline:12px}.account-link{font-size:9px;padding-inline:6px}
}

/* The full banner is the positioning reference, independent of the side controls.
   The current logo is reduced by another 3% around its center, including on narrow screens. */
.site-header .header-inner,
.yz-home .yz-bar-in.yz-bar-in--course-logo{
 position:relative;--sm-wide-logo-width:140.79px;
}
.site-header .header-inner{--sm-logo-side-space:244px;min-height:65.4px}
a.sm-brand.sm-brand--wide{
 position:static;grid-template-columns:max-content;column-gap:0;flex:none;
}
.sm-brand--wide .sm-mark{
 position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.97);
 width:min(var(--sm-wide-logo-width),max(0px,calc(100% - var(--sm-logo-side-space) * 2)));
 height:auto;max-width:none;aspect-ratio:3 / 1;border-radius:0;
}

/* Keep the service name and controls at either edge, with the artwork centered. */
a.sm-brand.sm-brand--text,a.yz-logo.sm-brand.sm-brand--text{grid-template-columns:max-content;column-gap:0}
.yz-home .yz-bar-in.yz-bar-in--course-logo,
.yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu{
 --sm-logo-side-space:160px;display:flex;justify-content:space-between;
 min-height:61.4px;padding:6px 14px;gap:10px;align-items:center;
}
.yz-home .yz-bar-in.yz-bar-in--course-logo>.yz-course.yz-course--logo,
.yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu>.yz-course.yz-course--logo{
 position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.97);
 display:block;width:min(var(--sm-wide-logo-width),max(0px,calc(100% - var(--sm-logo-side-space) * 2)));
 max-width:none;min-width:0;aspect-ratio:3 / 1;overflow:visible;padding:0;line-height:0;
}
.yz-course--logo>img{
 display:block;width:100%;height:auto;max-width:100%;object-fit:contain;
}
@media(max-width:699px){
 .site-header .header-inner,
 .yz-home .yz-bar-in.yz-bar-in--course-logo{--sm-wide-logo-width:129.96px}
 .site-header .header-inner{min-height:62px}
 .yz-home .yz-bar-in.yz-bar-in--course-logo,
 .yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu{
  min-height:57.6px;padding:6px 12px;gap:6px;
 }
}
@media(max-width:600px){
 .site-header .header-inner{--sm-logo-side-space:120px;min-height:58px}
}
@media(max-width:559px){
 .yz-home .yz-bar-in.yz-bar-in--course-logo,
 .yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu{--sm-logo-side-space:122px}
}
@media(max-width:359px){
 .site-header .header-inner{--sm-logo-side-space:106px}
 .yz-home .yz-bar-in.yz-bar-in--course-logo,
 .yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu{
  --sm-logo-side-space:114px;padding-inline:10px;gap:5px;
 }
}

/* Warm brown from approved phone preview 08, shared by both entry pages. */
:root{--sm-board:#967f63;--sm-chalk:#fffdf7}
.site-header,.yz-home>.yz-bar{
 background-color:var(--sm-board);
 background-image:linear-gradient(115deg,#ffffff05,#00000008),url('/study/assets/chalkboard-grain-20261022.svg');
 border-bottom:1px solid #ffffff1c;color:var(--sm-chalk);
 backdrop-filter:none;-webkit-backdrop-filter:none;
}
.site-header .sm-brand,.yz-home>.yz-bar .sm-brand{--sm-tagline-size:7.2px;color:var(--sm-chalk)}
/* The service name determines both lines' width; fit the tagline underneath. */
.site-header .sm-brand>b,.yz-home>.yz-bar .sm-brand>b{font-size:calc(var(--sm-tagline-size) * 1.666667)}
.site-header .sm-tagline,.yz-home>.yz-bar .sm-tagline{
 contain:inline-size;font-size:calc(var(--sm-tagline-size) * .75);
 text-align:justify;text-align-last:justify;color:var(--sm-chalk);opacity:.94;
}
.site-header .header-nav :is(a,button),.yz-home>.yz-bar :is(.yz-ibtn,.yz-account-link,.yz-menu-button){color:var(--sm-chalk)}
.site-header .header-nav :is(a,button):hover,.yz-home>.yz-bar :is(.yz-ibtn,.yz-account-link,.yz-menu-button):hover{background:#ffffff12;color:#fff}
.site-header :focus-visible,.yz-home>.yz-bar :focus-visible{outline:2px solid var(--sm-chalk);outline-offset:3px}
.site-header .header-inner{min-height:61.4px}
.yz-home .yz-bar-in.yz-bar-in--chalkboard>.yz-logo{position:static;transform:none}
.yz-home .yz-bar-in.yz-bar-in--chalkboard>.yz-header-actions{margin-left:auto}
:root:not([data-theme=night]):not([data-theme=sepia]) body.yz-home{
 --mist:#efede4;--paper:#fbf8f0;--paper-2:#f1eee4;
 --ink:#302f2b;--ink-2:#74736f;--ink-3:#81817c;
 --line:#e3e0d7;--line-2:#d5d4cc;
}
@media(min-width:700px){
 .site-header .sm-brand,.yz-home>.yz-bar .sm-brand{--sm-tagline-size:7.92px}
}
@media(max-width:800px){.site-header .directory-link{display:none}}
@media(max-width:699px){
 .site-header .header-inner{min-height:57.6px;padding:6px 12px}
 .site-header .header-inner{--sm-logo-side-space:122px}
}
@media(max-width:359px){
 .site-header .sm-brand,.yz-home>.yz-bar .sm-brand{--sm-tagline-size:6.72px}
 .site-header .header-inner{--sm-logo-side-space:114px;padding-inline:10px}
}

/* Match the approved compact phone header on both entry pages. Keep the
   artwork proportions and the existing 44px controls; remove vertical padding. */
:root{--sm-header-height:52px}
@media(max-width:699px){:root{--sm-header-height:48px}}
.site-header .header-inner,
.yz-home .yz-bar-in.yz-bar-in--course-logo,
.yz-home .yz-bar-in.yz-bar-in--course-logo.has-site-menu{
 height:auto;min-height:var(--sm-header-height);padding-block:2px;
}

/* Approved washi preview 08: softer paper surfaces and a more textured header. */
:root{--sm-washi:url('/study/assets/washi-paper-20261023-balanced.svg')}
:root:not([data-theme=night]):not([data-theme=sepia]) body.yz-home,
:root:not([data-theme=night]):not([data-theme=sepia]) body:has(>.site-header){
 background-image:var(--sm-washi);background-size:480px 360px;
}
:root:not([data-theme=night]):not([data-theme=sepia]) .yz-home .yz-railwrap{
 background-image:var(--sm-washi);background-size:480px 360px;
}
:root:not([data-theme=night]):not([data-theme=sepia]) .yz-home :is(.yz-tab,.yz-card,.yz-note,.yz-resume,.yz-next-row),
:root:not([data-theme=night]):not([data-theme=sepia]) .yz-home .yz-pane .flow-section,
:root:not([data-theme=night]):not([data-theme=sepia]) .yz-home .yz-pane-side>.past-review,
:root:not([data-theme=night]):not([data-theme=sepia]) :is(.exam-grid,.exam-ready,.exam-search){
 background-image:var(--sm-washi);background-size:480px 360px;
}
.site-header,.yz-home>.yz-bar{
 background-color:var(--sm-board);
 background-image:url('/study/assets/washi-header-20261023-balanced.svg');
 background-size:400px 300px;background-blend-mode:soft-light;
}
@media(forced-colors:active){
 .site-header,.yz-home>.yz-bar,.yz-home .yz-pane .flow-section,.yz-home .yz-card{background-image:none}
}

/* Softer charcoal actions with a restrained paper grain. */
:root:not([data-theme=night]){--sm-charcoal:#323338;--sm-charcoal-hover:#3c3d42}
:root:not([data-theme=night]) .yz-home :is(.flow-start>button:not(:disabled):not(.yz-resume-top),.yz-btn-primary,.yz-go,.study-primary:not(:disabled)),
:root:not([data-theme=night]) .study-upgrade .study-checkout-button,
:root:not([data-theme=night]) .site-header~main :is(.exam-start,.search-submit){
 background-color:var(--sm-charcoal);color:#fffdf7;
 background-image:url('/study/assets/washi-buttons-20261023-fiber.svg');
 background-size:320px 240px;background-blend-mode:soft-light;
}
:root:not([data-theme=night]) .yz-home :is(.flow-start>button:not(:disabled):not(.yz-resume-top),.yz-btn-primary,.yz-go,.study-primary:not(:disabled)):hover,
:root:not([data-theme=night]) .study-upgrade .study-checkout-button:hover{background-color:var(--sm-charcoal-hover)}

/* The same signed-in badge on HOME, learning and information pages. */
#yzAccount{position:relative}#yzAccount.is-signed-in::after{content:'✓';position:absolute;top:1px;right:5px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#36543b;color:#fff;font:700 10px/1 sans-serif;box-shadow:0 0 0 2px var(--paper,#faf8ef)}
a.yz-course{text-decoration:none;color:inherit}a.yz-course:focus-visible{outline:2px solid currentColor;outline-offset:4px;border-radius:4px}.yz-info-crumb{flex-wrap:wrap}

.yz-info-crumb{display:flex;align-items:center;gap:7px;margin:8px 0 12px;font-size:12px;line-height:1.5;color:var(--ink-2,#777)}.yz-info-crumb a{color:inherit;text-decoration:none}.yz-info-crumb a:hover{text-decoration:underline}
