
.site-header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  height: calc(64px + env(safe-area-inset-top, 0px));
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  border: 0;
  background: var(--site-header-paper, transparent);
  color: var(--saju-ink, #382f2b);
  font-family: "Saju Round", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: -.02em;
}
.site-header .site-header__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: #382f2b;
  text-decoration: none;
}
.site-header .site-header__mark {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  max-width: none;
  object-fit: contain;
}
.site-header .site-header__brand > span {
  font-family: "Saju Display", "Saju Round", "Apple SD Gothic Neo", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.site-header .site-header__library {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #382f2b;
  font: 700 14px/1.3 "Saju Round", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-header :is(a, button):focus-visible,
.site-header__context a:focus-visible { outline: 2px solid #594296; outline-offset: 3px; }
.site-header [hidden] { display: none !important; }
.site-header .seed-chip { flex: 0 0 auto; margin-left: auto; }
.site-header__context {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
  color: #6b5d54;
  font: 14px/1.5 "Saju Round", "Apple SD Gothic Neo", sans-serif;
}
.site-header__context a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: inherit; text-decoration: none; }
.site-header__context svg { width: 18px; height: 18px; }
.site-header__review { min-height: 32px; font-size: 12px; }

body.sf-body #flow-dialog.is-tab-page:has(#flow-content > .site-header) {
  --site-header-paper: var(--saju-page, #fffefb);
  background: var(--saju-page, #fffefb);
  width: 100%; max-width: 480px; height: 100dvh; max-height: 100dvh;
  margin: 0 auto; padding: 0; border-radius: 0;
}
#flow-content > .site-header + .saved-shell.my-shell { padding: 20px 20px 25px; }

body.sf-body #flow-dialog.is-tab-page #flow-content:has(> .site-header) {
  box-sizing: border-box; width: 100%; margin: 0; padding-top: 0; padding-inline: 0; background: var(--saju-page, #fffefb);
}

.site-header .site-header__library.has-avatar{width:44px;min-width:44px;justify-content:center}

body.sf-body #flow-dialog .sf-bottom-nav{background:var(--saju-page,#fffcf7)}
body.sf-body #flow-dialog .sf-bottom-nav :is(.active,[aria-current=page]){color:var(--saju-action,#65507d)}

nav.site-header__context{width:100%;padding-top:4px;padding-bottom:12px;flex:0 0 auto}
nav.site-header__context a{justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border:1px solid #dfd4c7;border-radius:10px;background:#fffdf9;color:#382f2b;font:700 14px/1.3 "Saju Round","Apple SD Gothic Neo",sans-serif;white-space:nowrap}
nav.site-header__context .help-link{background:#f2ecf8;border-color:#dfd2eb;color:#644b7c}
nav.site-header__context a:hover{border-color:#b5a18a}
nav.site-header__context a:active{background:#eee5d9}
nav.site-header__context .help-link:active{background:#e7dcf0}
