/* Shared public navigation. Keep legacy page styles outside this namespace. */
.yh-nav-header {
  --yh-nav-bg:#0d0e10;
  --yh-nav-text:#f4f3f1;
  --yh-nav-muted:#bbbdc4;
  --yh-nav-accent:#f6b4d0;
  --yh-nav-line:rgba(238,239,242,.12);
  position:sticky;
  top:0;
  right:auto;
  left:auto;
  z-index:35;
  display:block;
  width:100%;
  max-width:none;
  height:auto;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid var(--yh-nav-line);
  background:var(--yh-nav-bg);
  color:var(--yh-nav-text);
  font-family:Pre,'Malgun Gothic',sans-serif;
  line-height:1.5;
  text-align:left;
}
body.home-page .yh-nav-header { top:32px; }
body.entry-pending .yh-nav-header { visibility:hidden; }
main > .yh-nav-header {
  width:var(--yh-nav-viewport-width,100vw);
  margin-inline:calc((100% - var(--yh-nav-viewport-width,100vw)) / 2);
}
.yh-nav-header *, .yh-nav-header *::before, .yh-nav-header *::after { box-sizing:border-box; }
.yh-nav-header a { color:inherit; text-decoration:none; }
.yh-nav-header button { font:inherit; color:inherit; cursor:pointer; }
.yh-nav-header a:focus-visible, .yh-nav-header button:focus-visible {
  outline:2px solid var(--yh-nav-accent);
  outline-offset:5px;
  border-radius:0;
}
.yh-nav-inner {
  display:flex;
  align-items:center;
  gap:clamp(30px,6vw,96px);
  width:min(calc(100% - 96px),1440px);
  min-height:74px;
  margin:0 auto;
}
.yh-nav-brand {
  display:inline-flex;
  flex:none;
  align-items:baseline;
  gap:12px;
  color:var(--yh-nav-text);
  font-size:19px;
  font-weight:750;
  letter-spacing:-.065em;
  line-height:1.2;
  white-space:nowrap;
}
.yh-nav-wordmark { color:#9da0a8; font-size:10px; font-weight:500; letter-spacing:.13em; }
.yh-nav-panel { display:flex; flex:1; align-items:center; justify-content:space-between; gap:28px; }
.yh-nav-list { display:flex; align-items:stretch; gap:34px; list-style:none; margin:0; padding:0; }
.yh-nav-item, .yh-nav-class-item { position:relative; margin:0; padding:0; list-style:none; }
.yh-nav-class-trigger { display:flex; align-items:center; }
.yh-nav-header .yh-nav-link {
  position:relative;
  display:flex;
  align-items:center;
  min-height:74px;
  padding:0;
  color:var(--yh-nav-muted);
  font-size:14px;
  font-weight:600;
  letter-spacing:-.025em;
  white-space:nowrap;
  transition:color .16s ease;
}
.yh-nav-header .yh-nav-link:hover, .yh-nav-current .yh-nav-link { color:var(--yh-nav-text); }
.yh-nav-current .yh-nav-link::after {
  content:'';
  position:absolute;
  right:0;
  bottom:17px;
  left:0;
  height:2px;
  background:#f064a6;
}
.yh-nav-submenu-toggle {
  display:none;
  align-items:center;
  justify-content:center;
  width:30px;
  height:44px;
  margin:0 -9px 0 1px;
  padding:0;
  border:0;
  background:transparent;
}
[data-yh-nav-enhanced] .yh-nav-submenu-toggle { display:flex; }
.yh-nav-chevron { display:block; width:6px; height:6px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:translateY(-2px) rotate(45deg); transition:transform .16s ease; }
.yh-nav-submenu-toggle[aria-expanded="true"] .yh-nav-chevron { transform:translateY(2px) rotate(225deg); }
.yh-nav-submenu {
  position:absolute;
  top:100%;
  left:-24px;
  z-index:1;
  width:208px;
  margin:0;
  padding:12px 24px 18px;
  list-style:none;
  border:1px solid var(--yh-nav-line);
  border-top:0;
  background:var(--yh-nav-bg);
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}
.yh-nav-submenu li { margin:0; padding:0; list-style:none; }
.yh-nav-header .yh-nav-submenu-link { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:44px; color:#c8c9ce; font-size:13px; font-weight:500; white-space:nowrap; }
.yh-nav-submenu-link span { color:#72747d; font-size:14px; }
.yh-nav-header .yh-nav-submenu-link:hover, .yh-nav-header .yh-nav-submenu-link[aria-current="page"] { color:var(--yh-nav-accent); }
.yh-nav-class-item:not([data-yh-nav-dismissed]):focus-within > .yh-nav-submenu,
.yh-nav-class-item[data-yh-nav-open] > .yh-nav-submenu { visibility:visible; opacity:1; pointer-events:auto; transform:none; }
@media (hover:hover) {
  .yh-nav-class-item:not([data-yh-nav-dismissed]):hover > .yh-nav-submenu { visibility:visible; opacity:1; pointer-events:auto; transform:none; }
}
.yh-nav-account { position:relative; display:flex; align-items:center; gap:24px; min-height:44px; font-size:12px; font-weight:500; white-space:nowrap; }
.yh-nav-auth-pending .yh-nav-account { visibility:hidden; }
/* Legal pages show only the brand until the existing session check confirms a
   member. Keep desktop and mobile menus hidden on first paint and BFCache recheck. */
[data-yh-nav-member-menu]:not([data-yh-nav-authenticated]) .yh-nav-panel,
[data-yh-nav-member-menu]:not([data-yh-nav-authenticated]) .yh-nav-mobile-toggle,
.yh-nav-auth-pending [data-yh-nav-member-menu] .yh-nav-panel,
.yh-nav-auth-pending [data-yh-nav-member-menu] .yh-nav-mobile-toggle { display:none !important; }
.yh-nav-account [hidden] { display:none !important; }
.yh-nav-header .yh-nav-login { display:inline-flex; align-items:center; min-height:44px; color:#d2d2d6; }
.yh-nav-header .yh-nav-signup { display:inline-flex; align-items:center; gap:12px; min-height:44px; color:var(--yh-nav-accent); }
.yh-nav-header .yh-nav-login:hover, .yh-nav-header .yh-nav-signup:hover { color:#fff; }
.yh-nav-mobile-toggle { display:none; }
[data-yh-nav-authenticated] .yh-nav-inner { gap:clamp(24px,3vw,48px); }
[data-yh-nav-authenticated] .yh-nav-account { gap:18px; }
.yh-nav-account-status { color:#b5afb6; font-size:11px; font-weight:500; }
.yh-nav-member { position:relative; display:flex; align-items:center; min-height:74px; }
.yh-nav-account-toggle { display:inline-flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:0; margin:0; border:0; background:transparent; color:var(--yh-nav-text); }
.yh-nav-account-toggle[aria-expanded="true"] { color:var(--yh-nav-accent); }
.yh-nav-account-toggle[aria-expanded="true"] .yh-nav-chevron { transform:translateY(2px) rotate(225deg); }
.yh-nav-account-menu { position:absolute; top:100%; right:-20px; z-index:2; min-width:204px; margin:0; padding:12px 20px 16px; list-style:none; border:1px solid var(--yh-nav-line); border-top:0; background:var(--yh-nav-bg); }
.yh-nav-account-menu li { margin:0; padding:0; list-style:none; }
.yh-nav-header .yh-nav-account-link { display:flex; align-items:center; min-height:44px; color:#c8c9ce; font-size:13px; }
.yh-nav-header .yh-nav-account-link:hover, .yh-nav-header .yh-nav-account-link[aria-current="page"] { color:var(--yh-nav-accent); }
.yh-nav-header .yh-nav-admin { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 15px; border:1px solid #f064a6; border-radius:2px; background:#f064a6; color:#210d17; font-size:12px; font-weight:750; }
.yh-nav-header .yh-nav-admin:hover { background:#f6b4d0; border-color:#f6b4d0; }
.yh-nav-header .yh-nav-admin[aria-current="page"] { border-color:#fff; }
.yh-nav-logout { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0; margin:0; border:0; background:transparent; color:var(--yh-nav-muted); }
.yh-nav-logout:hover { color:#fff; }
.yh-nav-logout:disabled { cursor:wait; opacity:.55; }
.yh-nav-header .yh-nav-password-link { display:inline-flex; align-items:center; min-height:44px; color:var(--yh-nav-accent); font-weight:650; }
.yh-nav-account-message { position:absolute; top:100%; right:0; z-index:3; width:270px; padding:15px 18px; border:1px solid var(--yh-nav-line); background:var(--yh-nav-bg); color:var(--yh-nav-accent); font-size:12px; line-height:1.6; white-space:normal; }
[data-yh-nav-password-required] .yh-nav-primary { display:none; }
[data-yh-nav-password-required] .yh-nav-panel { justify-content:flex-end; }

@media (max-width:1180px) and (min-width:901px) {
  [data-yh-nav-authenticated] .yh-nav-wordmark { display:none; }
  [data-yh-nav-authenticated] .yh-nav-account { gap:14px; }
  [data-yh-nav-authenticated] .yh-nav-list { gap:26px; }
}

@media (max-width:1050px) and (min-width:901px) {
  .yh-nav-inner { gap:32px; }
  .yh-nav-wordmark { display:none; }
  .yh-nav-list { gap:26px; }
  .yh-nav-account { gap:20px; }
}
@media (max-width:900px) {
  .yh-nav-inner { display:flex; flex-wrap:wrap; justify-content:space-between; gap:0; width:calc(100% - 48px); min-height:68px; }
  .yh-nav-brand { min-height:68px; align-items:center; }
  .yh-nav-wordmark { display:none; }
  [data-yh-nav-enhanced] .yh-nav-mobile-toggle { display:flex; }
  .yh-nav-mobile-toggle { align-items:center; justify-content:center; flex:none; width:44px; height:44px; margin:0 -10px 0 0; padding:0; border:0; background:transparent; }
  .yh-nav-menu-icon { position:relative; display:block; width:21px; height:12px; border-top:1px solid currentColor; border-bottom:1px solid currentColor; }
  .yh-nav-mobile-toggle[aria-expanded="true"] .yh-nav-menu-icon { height:0; border-bottom:0; transform:rotate(45deg); }
  .yh-nav-mobile-toggle[aria-expanded="true"] .yh-nav-menu-icon::after { content:''; position:absolute; inset:-1px 0 auto; border-top:1px solid currentColor; transform:rotate(-90deg); }
  .yh-nav-panel { display:flex; flex:0 0 100%; flex-direction:column; align-items:stretch; gap:0; padding:10px 0 25px; border-top:1px solid var(--yh-nav-line); }
  [data-yh-nav-enhanced] .yh-nav-panel { display:none; }
  [data-yh-nav-enhanced][data-yh-nav-mobile-open] .yh-nav-panel { display:flex; max-height:calc(100dvh - 110px); overflow-y:auto; }
  .yh-nav-list { flex-direction:column; gap:0; }
  .yh-nav-header .yh-nav-link { min-height:52px; font-size:16px; }
  .yh-nav-class-trigger { justify-content:space-between; gap:10px; }
  .yh-nav-class-trigger .yh-nav-link { flex:1; }
  .yh-nav-submenu-toggle { width:44px; height:44px; margin:0; }
  .yh-nav-current .yh-nav-link { color:var(--yh-nav-accent); }
  .yh-nav-current .yh-nav-link::after { content:none; }
  .yh-nav-submenu { position:static; display:block; width:auto; margin:0; padding:0 0 12px 16px; border:0; visibility:visible; opacity:1; pointer-events:auto; transform:none; transition:none; }
  [data-yh-nav-enhanced] .yh-nav-submenu { display:none; }
  [data-yh-nav-enhanced] .yh-nav-class-item[data-yh-nav-open] > .yh-nav-submenu { display:block; }
  .yh-nav-header .yh-nav-submenu-link { justify-content:flex-start; gap:20px; min-height:42px; font-size:14px; }
  .yh-nav-submenu-link span { display:none; }
  .yh-nav-account { gap:28px; margin-top:16px; padding-top:23px; border-top:1px solid var(--yh-nav-line); font-size:13px; }
  [data-yh-nav-authenticated] .yh-nav-inner { gap:0; }
  [data-yh-nav-authenticated] .yh-nav-account { flex-wrap:wrap; gap:10px 24px; }
  .yh-nav-account-status { flex:0 0 100%; font-size:12px; }
  .yh-nav-member { display:block; flex:0 0 100%; min-height:0; }
  .yh-nav-account-toggle { width:100%; min-height:48px; text-align:left; font-size:14px; }
  .yh-nav-account-toggle .yh-nav-chevron { margin-right:19px; }
  .yh-nav-account-menu { position:static; min-width:0; padding:0 0 12px 16px; border:0; }
  .yh-nav-header .yh-nav-account-link { min-height:44px; font-size:14px; }
  .yh-nav-header .yh-nav-admin { min-height:44px; padding-inline:22px; font-size:13px; }
  .yh-nav-logout { min-height:44px; }
  .yh-nav-account-message { position:static; flex:0 0 100%; width:auto; padding:10px 0 0; border:0; }
  [data-yh-nav-password-required] .yh-nav-account { margin-top:0; padding-top:6px; border-top:0; }
}
@media (max-width:600px) {
  body.home-page .yh-nav-header { top:29px; }
  .yh-nav-inner { width:calc(100% - 36px); min-height:64px; }
  .yh-nav-brand { min-height:64px; font-size:18px; }
}
@media (prefers-reduced-motion:reduce) {
  .yh-nav-header *, .yh-nav-header *::before, .yh-nav-header *::after { transition:none; }
}
